Browse Source

test: Darwin file watcher has paths now

Even when watching subdirs.
v0.11.2-release
isaacs 12 years ago
parent
commit
5e9c7a92f2
  1. 12
      test/simple/test-fs-watch.js

12
test/simple/test-fs-watch.js

@ -66,12 +66,8 @@ assert.doesNotThrow(
watcher.on('change', function(event, filename) {
assert.equal('change', event);
// darwin only shows the file path for subdir watching,
// not for individual file watching.
if (expectFilePath && process.platform !== 'darwin') {
if (expectFilePath) {
assert.equal('watch.txt', filename);
} else {
assert.equal(null, filename);
}
watcher.close();
++watchSeenOne;
@ -93,12 +89,8 @@ assert.doesNotThrow(
var watcher = fs.watch(filepathTwo, function(event, filename) {
assert.equal('change', event);
// darwin only shows the file path for subdir watching,
// not for individual file watching.
if (expectFilePath && process.platform !== 'darwin') {
if (expectFilePath) {
assert.equal('hasOwnProperty', filename);
} else {
assert.equal(null, filename);
}
watcher.close();
++watchSeenTwo;

Loading…
Cancel
Save