GeezerVison is showing github.com — test: favor strict equality in pummel net tests · nodejs/node@cc9bb34
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: test/pummel/test-net-connect-econnrefused.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -19,7 +19,7 @@ function pummel() { |
19 | 19 | net.createConnection(common.PORT).on('error', function(err) { |
20 | 20 | assert.equal(err.code, 'ECONNREFUSED'); |
21 | 21 | if (--pending > 0) return; |
22 | | - if (rounds == ROUNDS) return check(); |
| 22 | + if (rounds === ROUNDS) return check(); |
23 | 23 | rounds++; |
24 | 24 | pummel(); |
25 | 25 | }); |
|
Collapse file
Copy file name to clipboardExpand all lines: test/pummel/test-net-connect-memleak.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -17,7 +17,7 @@ var before = 0; |
17 | 17 | before = process.memoryUsage().rss; |
18 | 18 |
|
19 | 19 | net.createConnection(common.PORT, '127.0.0.1', function() { |
20 | | - assert(junk.length != 0); // keep reference alive |
| 20 | + assert.notStrictEqual(junk.length, 0); // keep reference alive |
21 | 21 | setTimeout(done, 10); |
22 | 22 | global.gc(); |
23 | 23 | }); |
|
Collapse file
Copy file name to clipboardExpand all lines: test/pummel/test-net-many-clients.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -69,7 +69,7 @@ server.listen(common.PORT, function() { |
69 | 69 | var finished_clients = 0; |
70 | 70 | for (var i = 0; i < concurrency; i++) { |
71 | 71 | runClient(function() { |
72 | | - if (++finished_clients == concurrency) server.close(); |
| 72 | + if (++finished_clients === concurrency) server.close(); |
73 | 73 | }); |
74 | 74 | } |
75 | 75 | }); |
|
Collapse file
Copy file name to clipboardExpand all lines: test/pummel/test-net-timeout.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -52,7 +52,7 @@ echo_server.listen(common.PORT, function() { |
52 | 52 | client.write('hello\r\n'); |
53 | 53 | }, 500); |
54 | 54 |
|
55 | | - if (exchanges == 5) { |
| 55 | + if (exchanges === 5) { |
56 | 56 | console.log('wait for timeout - should come in ' + timeout + ' ms'); |
57 | 57 | starttime = new Date(); |
58 | 58 | console.dir(starttime); |
|
Collapse file
Copy file name to clipboardExpand all lines: test/pummel/test-net-timeout2.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -14,7 +14,7 @@ var server = net.createServer(function(socket) { |
14 | 14 | var interval = setInterval(function() { |
15 | 15 | counter++; |
16 | 16 |
|
17 | | - if (counter == seconds) { |
| 17 | + if (counter === seconds) { |
18 | 18 | clearInterval(interval); |
19 | 19 | server.close(); |
20 | 20 | socket.destroy(); |
|