Included unwatchFile in test index.js

Co-authored-by: David Humphrey <david.humphrey@senecacollege.ca>
This commit is contained in:
Vince 2018-10-10 21:44:05 -04:00 committed by David Humphrey
parent fb76c0ec1e
commit b0809272a1
2 changed files with 9 additions and 4 deletions

View File

@ -42,6 +42,7 @@ require('./spec/trailing-slashes.spec');
require('./spec/times.spec'); require('./spec/times.spec');
require('./spec/time-flags.spec'); require('./spec/time-flags.spec');
require('./spec/fs.watch.spec'); require('./spec/fs.watch.spec');
require('./spec/fs.unwatchFile.spec');
require('./spec/errors.spec'); require('./spec/errors.spec');
require('./spec/fs.shell.spec'); require('./spec/fs.shell.spec');
require('./spec/fs.chmod.spec'); require('./spec/fs.chmod.spec');

View File

@ -1,7 +1,8 @@
var util = require('../lib/test-utils.js'); var util = require('../lib/test-utils.js');
var expect = require('chai').expect; var expect = require('chai').expect;
describe('fs.unwatchFile', function() { // Waiting on https://github.com/filerjs/filer/pull/553 to land
describe.skip('fs.unwatchFile', function() {
beforeEach(util.setup); beforeEach(util.setup);
afterEach(util.cleanup); afterEach(util.cleanup);
@ -12,8 +13,11 @@ describe('fs.unwatchFile', function() {
it('should not throw an error when using a file not being watched', function() { it('should not throw an error when using a file not being watched', function() {
var fs = util.fs(); var fs = util.fs();
fs.unwatchFile('/myfile', function(error){
expect(error).not.to.exist; try {
}); fs.unwatchFile('/myfile');
} catch(e) {
expect.fail('calling fs.unwatchFile() on a file should not throw');
}
}); });
}); });