Skip to content
Permalink
Browse files

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: #23527
Reviewed-By: Hitesh Kanwathirtha <digitalinfinity@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information...
Oktavianus Ludiro authored and jasnell committed Oct 12, 2018
1 parent 1fd1e60 commit 47b7f2ac4493b3f57455fbda9f850cdc1384802a
Showing with 5 additions and 5 deletions.
  1. +5 −5 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);

0 comments on commit 47b7f2a

Please sign in to comment.
You can’t perform that action at this time.