mirror of
https://github.com/tenrok/axios.git
synced 2026-05-15 11:59:42 +03:00
19 lines
576 B
JavaScript
19 lines
576 B
JavaScript
var parseHeaders = require('../../lib/parseHeaders');
|
|
|
|
module.exports = {
|
|
testParse: function (test) {
|
|
var date = new Date();
|
|
var parsed = parseHeaders(
|
|
'Date: ' + date.toISOString() + '\n' +
|
|
'Content-Type: application/json\n' +
|
|
'Connection: keep-alive\n' +
|
|
'Transfer-Encoding: chunked'
|
|
);
|
|
|
|
test.equals(parsed['date'], date.toISOString());
|
|
test.equals(parsed['content-type'], 'application/json');
|
|
test.equals(parsed['connection'], 'keep-alive');
|
|
test.equals(parsed['transfer-encoding'], 'chunked');
|
|
test.done();
|
|
}
|
|
}; |