From 2ee8a2a4153cd0cc7cc3c0a175e0b828810fd506 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 7 May 2017 09:28:12 -0700 Subject: [PATCH] test: favor deepStrictEqual over deepEqual test-http-mutable-headers uses assert.deepEqual() in three places but appears to only needs it in two of them. Replace one with assert.deepStrictEqual() and remove linting exception. --- test/parallel/test-http-mutable-headers.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/test/parallel/test-http-mutable-headers.js b/test/parallel/test-http-mutable-headers.js index adaca917c05fc1..63f4b4cad29568 100644 --- a/test/parallel/test-http-mutable-headers.js +++ b/test/parallel/test-http-mutable-headers.js @@ -73,17 +73,14 @@ const s = http.createServer(common.mustCall((req, res) => { assert.strictEqual(res.getHeader('x-test-header2'), 'testing'); const headersCopy = res.getHeaders(); - assert.strictEqual(Object.getPrototypeOf(headersCopy), null); - // eslint-disable-next-line no-restricted-properties - assert.deepEqual(headersCopy, { + const expected = { 'x-test-header': 'testing', 'x-test-header2': 'testing', 'set-cookie': cookies, 'x-test-array-header': arrayValues - }); - // eslint-disable-next-line no-restricted-properties - assert.deepEqual(headersCopy['set-cookie'], cookies); - assert.strictEqual(headersCopy['x-test-array-header'], arrayValues); + }; + Object.setPrototypeOf(expected, null); + assert.deepStrictEqual(headersCopy, expected); assert.deepStrictEqual(res.getHeaderNames(), ['x-test-header', 'x-test-header2',