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 <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
Oktavianus Ludiro authored and addaleax committed Oct 20, 2018
1 parent caebc2b commit a6fd45f
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 a6fd45f

Please sign in to comment.