From f9f6e5b834016809ddc3a81843a9a8f99ef0218d Mon Sep 17 00:00:00 2001 From: Vince Date: Sun, 23 Sep 2018 19:51:21 -0400 Subject: [PATCH] Fix #445 test cases for fs.unwatchFile --- tests/spec/fs.unwatchFile.spec.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/spec/fs.unwatchFile.spec.js diff --git a/tests/spec/fs.unwatchFile.spec.js b/tests/spec/fs.unwatchFile.spec.js new file mode 100644 index 0000000..6972ff6 --- /dev/null +++ b/tests/spec/fs.unwatchFile.spec.js @@ -0,0 +1,19 @@ +var util = require('../lib/test-utils.js'); +var expect = require('chai').expect; + +describe('fs.unwatchFile', function() { + beforeEach(util.setup); + afterEach(util.cleanup); + + it('should be a function', function() { + var fs = util.fs(); + expect(typeof fs.unwatchFile).to.equal('function'); + }); + + it('should not throw an error when using a file not being watched', function() { + var fs = util.fs(); + fs.unwatchFile('/myfile', function(error){ + expect(error).not.to.exist; + }); + }); +});