2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-17 19:21:29 +03:00

Adding support for URLSearchParams

This commit is contained in:
Nick Uraltsev
2016-05-07 12:26:28 -07:00
parent ea375220a2
commit f20490eb6b
10 changed files with 108 additions and 20 deletions
@@ -0,0 +1,21 @@
var normalizeHeaderName = require('../../../lib/helpers/normalizeHeaderName');
describe('helpers::normalizeHeaderName', function () {
it('should normalize matching header name', function () {
var headers = {
'conTenT-Type': 'foo/bar',
};
normalizeHeaderName(headers, 'Content-Type');
expect(headers['Content-Type']).toBe('foo/bar');
expect(headers['conTenT-Type']).toBeUndefined();
});
it('should not change non-matching header name', function () {
var headers = {
'content-type': 'foo/bar',
};
normalizeHeaderName(headers, 'Content-Length');
expect(headers['content-type']).toBe('foo/bar');
expect(headers['Content-Length']).toBeUndefined();
});
});