diff --git a/tests/spec/fs.truncate.spec.js b/tests/spec/fs.truncate.spec.js index 6b3487a..5a8bebb 100644 --- a/tests/spec/fs.truncate.spec.js +++ b/tests/spec/fs.truncate.spec.js @@ -223,3 +223,18 @@ describe('fs.truncate', function() { }); }); }); + + +describe('fsPromises.truncate', function () { + beforeEach(util.setup); + afterEach(util.cleanup); + it('should error when path does not exist (with promises)', () => { + var fsPromises = util.fs().promises; + + return fsPromises.truncate('/NonExistingPath', 0) + .catch(error => { + expect(error).to.exist; + expect(error.code).to.equal('ENOENT'); + }); + }); +}); \ No newline at end of file