From a6fd45ff3676c4b23cac129ed702a4a65bb33083 Mon Sep 17 00:00:00 2001 From: Oktavianus Ludiro Date: Fri, 12 Oct 2018 10:19:49 -0700 Subject: [PATCH] test: use correct argument order for assert.strictEqual() The previous code did not pass correct argument order to assert.strictEqual(). Before: First argument provided is expected value Second argument provided is actual value After: First argument provided is actual value Second argument provided is expected value PR-URL: https://github.com/nodejs/node/pull/23527 Reviewed-By: Hitesh Kanwathirtha Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: Trivikram Kamat Reviewed-By: Ruben Bridgewater --- test/pummel/test-fs-watch-file.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/pummel/test-fs-watch-file.js b/test/pummel/test-fs-watch-file.js index e9d208778faf3f..d8694418e9eea5 100644 --- a/test/pummel/test-fs-watch-file.js +++ b/test/pummel/test-fs-watch-file.js @@ -50,10 +50,10 @@ process.on('exit', function() { fs.unlinkSync(filepathTwoAbs); fs.unlinkSync(filenameThree); fs.unlinkSync(filenameFour); - assert.strictEqual(1, watchSeenOne); - assert.strictEqual(2, watchSeenTwo); - assert.strictEqual(1, watchSeenThree); - assert.strictEqual(1, watchSeenFour); + assert.strictEqual(watchSeenOne, 1); + assert.strictEqual(watchSeenTwo, 2); + assert.strictEqual(watchSeenThree, 1); + assert.strictEqual(watchSeenFour, 1); }); @@ -134,7 +134,7 @@ setTimeout(function() { { // Does not throw. function a() { ++watchSeenFour; - assert.strictEqual(1, watchSeenFour); + assert.strictEqual(watchSeenFour, 1); fs.unwatchFile(`.${path.sep}${filenameFour}`, a); } fs.watchFile(filenameFour, a);