Skip to content

Commit

Permalink
test: no unused args test-fs-watch-file.js
Browse files Browse the repository at this point in the history
PR-URL: #10758
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
  • Loading branch information
istinson authored and jasnell committed Jan 13, 2017
1 parent 5520e40 commit 19917ee
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/pummel/test-fs-watch-file.js
Expand Up @@ -41,13 +41,13 @@ assert.throws(
fs.watchFile(filepathOne); fs.watchFile(filepathOne);
}, },
function(e) { function(e) {
return e.message === 'watchFile requires a listener function'; return e.message === '"watchFile()" requires a listener function';
} }
); );


assert.doesNotThrow( assert.doesNotThrow(
function() { function() {
fs.watchFile(filepathOne, function(curr, prev) { fs.watchFile(filepathOne, function() {
fs.unwatchFile(filepathOne); fs.unwatchFile(filepathOne);
++watchSeenOne; ++watchSeenOne;
}); });
Expand All @@ -68,17 +68,17 @@ assert.throws(
fs.watchFile(filepathTwo); fs.watchFile(filepathTwo);
}, },
function(e) { function(e) {
return e.message === 'watchFile requires a listener function'; return e.message === '"watchFile()" requires a listener function';
} }
); );


assert.doesNotThrow( assert.doesNotThrow(
function() { function() {
function a(curr, prev) { function a() {
fs.unwatchFile(filepathTwo, a); fs.unwatchFile(filepathTwo, a);
++watchSeenTwo; ++watchSeenTwo;
} }
function b(curr, prev) { function b() {
fs.unwatchFile(filepathTwo, b); fs.unwatchFile(filepathTwo, b);
++watchSeenTwo; ++watchSeenTwo;
} }
Expand All @@ -93,10 +93,10 @@ setTimeout(function() {


assert.doesNotThrow( assert.doesNotThrow(
function() { function() {
function a(curr, prev) { function a() {
assert.ok(0); // should not run assert.ok(0); // should not run
} }
function b(curr, prev) { function b() {
fs.unwatchFile(filenameThree, b); fs.unwatchFile(filenameThree, b);
++watchSeenThree; ++watchSeenThree;
} }
Expand All @@ -120,7 +120,7 @@ setTimeout(function() {


assert.doesNotThrow( assert.doesNotThrow(
function() { function() {
function a(curr, prev) { function a() {
++watchSeenFour; ++watchSeenFour;
assert.strictEqual(1, watchSeenFour); assert.strictEqual(1, watchSeenFour);
fs.unwatchFile('.' + path.sep + filenameFour, a); fs.unwatchFile('.' + path.sep + filenameFour, a);
Expand Down

0 comments on commit 19917ee

Please sign in to comment.