utils.js
This file
Path
test/support/utils.js
24 lines · 472 bytes · JavaScript
Last changed by
Merge tag '4.14.0'Douglas Christopher Wilsonbefore adoption1dbfee6
History of this fileTake it
12345678910111213141516171819202122232425
/** * Module dependencies. * @private */var assert = require('assert');
/** * Module exports. * @public */exports.shouldNotHaveHeader = shouldNotHaveHeader;
/** * Assert that a supertest response does not have a header. * * @param {string} header Header name to check * @returns {function} */function shouldNotHaveHeader(header) { return function (res) { assert.ok(!(header.toLowerCase() in res.headers), 'should not have header ' + header); };}