all files / modules/utils/__tests__/ normalizeHeaderName-test.js

100% Statements 10/10
100% Branches 0/0
100% Functions 4/4
100% Lines 10/10
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18       11×   11× 11×        
const expect = require("expect");
const IrregularHeaderNames = require("../IrregularHeaderNames");
const normalizeHeaderName = require("../normalizeHeaderName");
 
describe("normalizeHeaderName", function () {
    it("correctly normalizes Content-Type", function () {
        expect(normalizeHeaderName("content-type")).toEqual("Content-Type");
    });
 
    Object.keys(IrregularHeaderNames).forEach(function (key) {
        const headerName = IrregularHeaderNames[key];
 
        it(`correctly normalizes ${headerName}`, function () {
            expect(normalizeHeaderName(key)).toEqual(headerName);
        });
    });
});