From 4c5d24b63295fa024c0123445d76f634d9bdb83d Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 25 Nov 2016 20:37:19 -0800 Subject: [PATCH] test: refine test-http-status-reason-invalid-chars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * replace unneeded template strings with strings; there was no variable substitution or concatenation or anything like that * assert.notEqual() -> assert.notStrictEqual() PR-URL: https://github.com/nodejs/node/pull/9802 Reviewed-By: Prince John Wesley Reviewed-By: Michaƫl Zasso Reviewed-By: Santiago Gimeno Reviewed-By: Colin Ihrig Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Luigi Pinca --- test/parallel/test-http-status-reason-invalid-chars.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-http-status-reason-invalid-chars.js b/test/parallel/test-http-status-reason-invalid-chars.js index 7a8564a906131a..09d5855cf52c6c 100644 --- a/test/parallel/test-http-status-reason-invalid-chars.js +++ b/test/parallel/test-http-status-reason-invalid-chars.js @@ -6,7 +6,7 @@ const http = require('http'); function explicit(req, res) { assert.throws(() => { - res.writeHead(200, `OK\r\nContent-Type: text/html\r\n`); + res.writeHead(200, 'OK\r\nContent-Type: text/html\r\n'); }, /Invalid character in statusMessage/); assert.throws(() => { @@ -19,7 +19,7 @@ function explicit(req, res) { function implicit(req, res) { assert.throws(() => { - res.statusMessage = `OK\r\nContent-Type: text/html\r\n`; + res.statusMessage = 'OK\r\nContent-Type: text/html\r\n'; res.writeHead(200); }, /Invalid character in statusMessage/); res.statusMessage = 'OK'; @@ -37,8 +37,8 @@ const server = http.createServer((req, res) => { let left = 2; const check = common.mustCall((res) => { left--; - assert.notEqual(res.headers['content-type'], 'text/html'); - assert.notEqual(res.headers['content-type'], 'gotcha'); + assert.notStrictEqual(res.headers['content-type'], 'text/html'); + assert.notStrictEqual(res.headers['content-type'], 'gotcha'); if (left === 0) server.close(); }, 2); http.get(`${url}/explicit`, check).end();