| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9fbe91a commit ee8fa52
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(); | |
@@ -156,8 +156,8 @@ function test_standard_http() { | |||
| 156 | 156 | }); | |
| 157 | 157 | ||
| 158 | 158 | conn.once('data', function(data) { | |
| 159 | - assert.strictEqual('string', typeof data); | ||
| 160 | - assert.strictEqual('HTTP/1.1 200', data.substr(0, 12)); | ||
| 159 | + assert.strictEqual(typeof data, 'string'); | ||
| 160 | + assert.strictEqual(data.substr(0, 12), 'HTTP/1.1 200'); | ||
| 161 | 161 | conn.end(); | |
| 162 | 162 | }); | |
| 163 | 163 | ||
@@ -179,6 +179,6 @@ server.listen(0, function() { | |||
| 179 | 179 | Fin. | |
| 180 | 180 | -----------------------------------------------*/ | |
| 181 | 181 | process.on('exit', function() { | |
| 182 | - assert.strictEqual(3, requests_recv); | ||
| 183 | - assert.strictEqual(3, requests_sent); | ||
| 182 | + assert.strictEqual(requests_recv, 3); | ||
| 183 | + assert.strictEqual(requests_sent, 3); | ||
| 184 | 184 | }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments