2019-01-30 20:17:29 +00:00
|
|
|
const util = require('../lib/test-utils.js');
|
|
|
|
const expect = require('chai').expect;
|
2018-09-23 23:51:21 +00:00
|
|
|
|
2018-10-11 01:44:05 +00:00
|
|
|
// Waiting on https://github.com/filerjs/filer/pull/553 to land
|
|
|
|
describe.skip('fs.unwatchFile', function() {
|
2018-09-23 23:51:21 +00:00
|
|
|
beforeEach(util.setup);
|
|
|
|
afterEach(util.cleanup);
|
|
|
|
|
|
|
|
it('should be a function', function() {
|
2019-01-30 20:17:29 +00:00
|
|
|
const fs = util.fs();
|
2018-09-23 23:51:21 +00:00
|
|
|
expect(typeof fs.unwatchFile).to.equal('function');
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should not throw an error when using a file not being watched', function() {
|
2019-01-30 20:17:29 +00:00
|
|
|
const fs = util.fs();
|
2018-10-11 01:44:05 +00:00
|
|
|
|
|
|
|
try {
|
|
|
|
fs.unwatchFile('/myfile');
|
|
|
|
} catch(e) {
|
|
|
|
expect.fail('calling fs.unwatchFile() on a file should not throw');
|
|
|
|
}
|
2018-09-23 23:51:21 +00:00
|
|
|
});
|
|
|
|
});
|