| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3f2a016 commit 3a864d7
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -98,20 +98,20 @@ function test_upgrade_with_listener() { | |||
| 98 | 98 | conn.on('data', function(data) { | |
| 99 | 99 | state++; | |
| 100 | 100 | ||
| 101 | - assert.strictEqual('string', typeof data); | ||
| 101 | + assert.strictEqual(typeof data, 'string'); | ||
| 102 | 102 | ||
| 103 | 103 | if (state === 1) { | |
| 104 | - assert.strictEqual('HTTP/1.1 101', data.substr(0, 12)); | ||
| 105 | - assert.strictEqual('WjN}|M(6', request_upgradeHead.toString('utf8')); | ||
| 104 | + assert.strictEqual(data.substr(0, 12), 'HTTP/1.1 101'); | ||
| 105 | + assert.strictEqual(request_upgradeHead.toString('utf8'), 'WjN}|M(6'); | ||
| 106 | 106 | conn.write('test', 'utf8'); | |
| 107 | 107 | } else if (state === 2) { | |
| 108 | - assert.strictEqual('test', data); | ||
| 108 | + assert.strictEqual(data, 'test'); | ||
| 109 | 109 | conn.write('kill', 'utf8'); | |
| 110 | 110 | } | |
| 111 | 111 | }); | |
| 112 | 112 | ||
| 113 | 113 | conn.on('end', function() { | |
| 114 | - assert.strictEqual(2, state); | ||
| 114 | + assert.strictEqual(state, 2); | ||
| 115 | 115 | conn.end(); | |
| 116 | 116 | server.removeAllListeners('upgrade'); | |
| 117 | 117 | test_upgrade_no_listener(); | |
@@ -157,8 +157,8 @@ function test_standard_http() { | |||
| 157 | 157 | }); | |
| 158 | 158 | ||
| 159 | 159 | conn.once('data', function(data) { | |
| 160 | - assert.strictEqual('string', typeof data); | ||
| 161 | - assert.strictEqual('HTTP/1.1 200', data.substr(0, 12)); | ||
| 160 | + assert.strictEqual(typeof data, 'string'); | ||
| 161 | + assert.strictEqual(data.substr(0, 12), 'HTTP/1.1 200'); | ||
| 162 | 162 | conn.end(); | |
| 163 | 163 | }); | |
| 164 | 164 | ||
@@ -180,7 +180,7 @@ server.listen(0, function() { | |||
| 180 | 180 | Fin. | |
| 181 | 181 | -----------------------------------------------*/ | |
| 182 | 182 | process.on('exit', function() { | |
| 183 | - assert.strictEqual(3, requests_recv); | ||
| 184 | - assert.strictEqual(3, requests_sent); | ||
| 183 | + assert.strictEqual(requests_recv, 3); | ||
| 184 | + assert.strictEqual(requests_sent, 3); | ||
| 185 | 185 | assert.ok(test_upgrade_no_listener_ended); | |
| 186 | 186 | }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments