summaryrefslogtreecommitdiff
path: root/test/parallel/test-http-status-reason-invalid-chars.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2016-11-25 20:37:19 -0800
committerRich Trott <rtrott@gmail.com>2016-11-29 08:45:24 -0600
commitf540794966ee8973d16638515991785735607a35 (patch)
tree393b8a016b67109a2bfa4912b0b04428c2ebe5d4 /test/parallel/test-http-status-reason-invalid-chars.js
parent85a6b532973e09c92220a48442cd0cbbc6b2da3a (diff)
downloadandroid-node-v8-f540794966ee8973d16638515991785735607a35.tar.gz
android-node-v8-f540794966ee8973d16638515991785735607a35.tar.bz2
android-node-v8-f540794966ee8973d16638515991785735607a35.zip
test: refine test-http-status-reason-invalid-chars
* 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 <princejohnwesley@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'test/parallel/test-http-status-reason-invalid-chars.js')
-rw-r--r--test/parallel/test-http-status-reason-invalid-chars.js8
1 files 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 245822d014..9950eeeee9 100644
--- a/test/parallel/test-http-status-reason-invalid-chars.js
+++ b/test/parallel/test-http-status-reason-invalid-chars.js
@@ -7,7 +7,7 @@ const net = require('net');
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(() => {
@@ -20,7 +20,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';
@@ -40,8 +40,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();