| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,23 +16,23 @@ var server = http.createServer(function(req, res) { | |||
| 16 | 16 | req.id = request_number++; | |
| 17 | 17 | ||
| 18 | 18 | if (req.id === 0) { | |
| 19 | - assert.equal('GET', req.method); | ||
| 20 | - assert.equal('/hello', url.parse(req.url).pathname); | ||
| 21 | - assert.equal('world', qs.parse(url.parse(req.url).query).hello); | ||
| 22 | - assert.equal('b==ar', qs.parse(url.parse(req.url).query).foo); | ||
| 19 | + assert.strictEqual('GET', req.method); | ||
| 20 | + assert.strictEqual('/hello', url.parse(req.url).pathname); | ||
| 21 | + assert.strictEqual('world', qs.parse(url.parse(req.url).query).hello); | ||
| 22 | + assert.strictEqual('b==ar', qs.parse(url.parse(req.url).query).foo); | ||
| 23 | 23 | } | |
| 24 | 24 | ||
| 25 | 25 | if (req.id === 1) { | |
| 26 | - assert.equal('POST', req.method); | ||
| 27 | - assert.equal('/quit', url.parse(req.url).pathname); | ||
| 26 | + assert.strictEqual('POST', req.method); | ||
| 27 | + assert.strictEqual('/quit', url.parse(req.url).pathname); | ||
| 28 | 28 | } | |
| 29 | 29 | ||
| 30 | 30 | if (req.id === 2) { | |
| 31 | - assert.equal('foo', req.headers['x-x']); | ||
| 31 | + assert.strictEqual('foo', req.headers['x-x']); | ||
| 32 | 32 | } | |
| 33 | 33 | ||
| 34 | 34 | if (req.id === 3) { | |
| 35 | - assert.equal('bar', req.headers['x-x']); | ||
| 35 | + assert.strictEqual('bar', req.headers['x-x']); | ||
| 36 | 36 | this.close(); | |
| 37 | 37 | } | |
| 38 | 38 | ||
@@ -75,7 +75,7 @@ server.on('listening', function() { | |||
| 75 | 75 | // you set server.httpAllowHalfOpen=true, which we've done | |
| 76 | 76 | // above. | |
| 77 | 77 | c.end(); | |
| 78 | - assert.equal(c.readyState, 'readOnly'); | ||
| 78 | + assert.strictEqual(c.readyState, 'readOnly'); | ||
| 79 | 79 | requests_sent += 2; | |
| 80 | 80 | } | |
| 81 | 81 | ||
@@ -86,19 +86,19 @@ server.on('listening', function() { | |||
| 86 | 86 | }); | |
| 87 | 87 | ||
| 88 | 88 | c.on('close', function() { | |
| 89 | - assert.equal(c.readyState, 'closed'); | ||
| 89 | + assert.strictEqual(c.readyState, 'closed'); | ||
| 90 | 90 | }); | |
| 91 | 91 | }); | |
| 92 | 92 | ||
| 93 | 93 | process.on('exit', function() { | |
| 94 | - assert.equal(4, request_number); | ||
| 95 | - assert.equal(4, requests_sent); | ||
| 94 | + assert.strictEqual(4, request_number); | ||
| 95 | + assert.strictEqual(4, requests_sent); | ||
| 96 | 96 | ||
| 97 | 97 | var hello = new RegExp('/hello'); | |
| 98 | - assert.equal(true, hello.exec(server_response) != null); | ||
| 98 | + assert.notStrictEqual(null, hello.exec(server_response)); | ||
| 99 | 99 | ||
| 100 | 100 | var quit = new RegExp('/quit'); | |
| 101 | - assert.equal(true, quit.exec(server_response) != null); | ||
| 101 | + assert.notStrictEqual(null, quit.exec(server_response)); | ||
| 102 | 102 | ||
| 103 | - assert.equal(true, client_got_eof); | ||
| 103 | + assert.strictEqual(true, client_got_eof); | ||
| 104 | 104 | }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments