diff --git a/tests/spec/fs.stat.spec.js b/tests/spec/fs.stat.spec.js index a2c9e4d..3a0cb61 100644 --- a/tests/spec/fs.stat.spec.js +++ b/tests/spec/fs.stat.spec.js @@ -121,3 +121,22 @@ describe('fs.stat', function() { }); }); }); + +/** + * fsPromises tests + */ + +describe('fsPromises.stat', function() { + beforeEach(util.setup); + afterEach(util.cleanup); + + it('should return an error if path does not exist', function() { + var fsPromises = util.fs().promises; + + return fsPromises.stat('/tmp') + .catch(error => { + expect(error).to.exist; + expect(error.code).to.equal('ENOENT'); + }); + }); +});