summaryrefslogtreecommitdiff
path: root/test/pummel
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2018-03-02 02:44:18 +0000
committerAnatoli Papirovski <apapirovski@mac.com>2018-03-04 15:33:18 +0100
commitf2d93795bfe61a3260bf743d2247b56b83fc6f70 (patch)
tree2edc3c4ced9bc6309e3a93c3af474adf16933187 /test/pummel
parent7bc8eb8da7ccdcd67edaf612b6599ec04ab77cb1 (diff)
downloadandroid-node-v8-f2d93795bfe61a3260bf743d2247b56b83fc6f70.tar.gz
android-node-v8-f2d93795bfe61a3260bf743d2247b56b83fc6f70.tar.bz2
android-node-v8-f2d93795bfe61a3260bf743d2247b56b83fc6f70.zip
lib,test: remove yoda statements
PR-URL: https://github.com/nodejs/node/pull/18746 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/pummel')
-rw-r--r--test/pummel/test-net-throttle.js2
-rw-r--r--test/pummel/test-next-tick-infinite-calls.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/pummel/test-net-throttle.js b/test/pummel/test-net-throttle.js
index ea48aa74d2..a08ed85ccd 100644
--- a/test/pummel/test-net-throttle.js
+++ b/test/pummel/test-net-throttle.js
@@ -39,7 +39,7 @@ const server = net.createServer(function(connection) {
connection.write(body.slice(part_N, 2 * part_N));
assert.strictEqual(false, connection.write(body.slice(2 * part_N, N)));
console.log(`bufferSize: ${connection.bufferSize}`, 'expecting', N);
- assert.ok(0 <= connection.bufferSize &&
+ assert.ok(connection.bufferSize >= 0 &&
connection.writableLength <= N);
connection.end();
});
diff --git a/test/pummel/test-next-tick-infinite-calls.js b/test/pummel/test-next-tick-infinite-calls.js
index b72d18fa40..5ee44076dc 100644
--- a/test/pummel/test-next-tick-infinite-calls.js
+++ b/test/pummel/test-next-tick-infinite-calls.js
@@ -28,7 +28,7 @@ let complete = 0;
// FATAL ERROR: JS Allocation failed - process out of memory
// if the depth counter doesn't clear the nextTickQueue properly.
(function runner() {
- if (1e8 > ++complete)
+ if (++complete < 1e8)
process.nextTick(runner);
}());