| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 81d49aa commit 4c5d24b
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,7 +6,7 @@ const http = require('http'); | |||
| 6 | 6 | ||
| 7 | 7 | function explicit(req, res) { | |
| 8 | 8 | assert.throws(() => { | |
| 9 | - res.writeHead(200, `OK\r\nContent-Type: text/html\r\n`); | ||
| 9 | + res.writeHead(200, 'OK\r\nContent-Type: text/html\r\n'); | ||
| 10 | 10 | }, /Invalid character in statusMessage/); | |
| 11 | 11 | ||
| 12 | 12 | assert.throws(() => { | |
@@ -19,7 +19,7 @@ function explicit(req, res) { | |||
| 19 | 19 | ||
| 20 | 20 | function implicit(req, res) { | |
| 21 | 21 | assert.throws(() => { | |
| 22 | - res.statusMessage = `OK\r\nContent-Type: text/html\r\n`; | ||
| 22 | + res.statusMessage = 'OK\r\nContent-Type: text/html\r\n'; | ||
| 23 | 23 | res.writeHead(200); | |
| 24 | 24 | }, /Invalid character in statusMessage/); | |
| 25 | 25 | res.statusMessage = 'OK'; | |
@@ -37,8 +37,8 @@ const server = http.createServer((req, res) => { | |||
| 37 | 37 | let left = 2; | |
| 38 | 38 | const check = common.mustCall((res) => { | |
| 39 | 39 | left--; | |
| 40 | - assert.notEqual(res.headers['content-type'], 'text/html'); | ||
| 41 | - assert.notEqual(res.headers['content-type'], 'gotcha'); | ||
| 40 | + assert.notStrictEqual(res.headers['content-type'], 'text/html'); | ||
| 41 | + assert.notStrictEqual(res.headers['content-type'], 'gotcha'); | ||
| 42 | 42 | if (left === 0) server.close(); | |
| 43 | 43 | }, 2); | |
| 44 | 44 | http.get(`${url}/explicit`, check).end(); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments