mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Moving many nodeunit tests to jasmine
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
var parseHeaders = require('../../../lib/helpers/parseHeaders');
|
||||
|
||||
describe('helpers::parseHeaders', function () {
|
||||
it('should parse headers', function () {
|
||||
var date = new Date();
|
||||
var parsed = parseHeaders(
|
||||
'Date: ' + date.toISOString() + '\n' +
|
||||
'Content-Type: application/json\n' +
|
||||
'Connection: keep-alive\n' +
|
||||
'Transfer-Encoding: chunked'
|
||||
);
|
||||
|
||||
expect(parsed['date']).toEqual(date.toISOString());
|
||||
expect(parsed['content-type']).toEqual('application/json');
|
||||
expect(parsed['connection']).toEqual('keep-alive');
|
||||
expect(parsed['transfer-encoding']).toEqual('chunked');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user