Skip to content

Commit

Permalink
test: use correct argument order for assert.strictEqual()
Browse files Browse the repository at this point in the history
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 MylesBorins committed Oct 30, 2018
1 parent 5d7c15b commit efdbc2d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/pummel/test-fs-watch-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});


Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit efdbc2d

Please sign in to comment.