diff --git a/tests/spec/fs.mkdir.spec.js b/tests/spec/fs.mkdir.spec.js index 5dcd154..268cb2b 100644 --- a/tests/spec/fs.mkdir.spec.js +++ b/tests/spec/fs.mkdir.spec.js @@ -45,4 +45,13 @@ describe('fs.mkdir', function() { }); }); }); -}); + + it('should return an error if the path already exists (using promises)', () => { + var fsPromises = util.fs().promises; + return fsPromises.mkdir('/').catch(error => { + expect(error).to.exist; + expect(error.code).to.equal('EEXIST'); + }); + }); + +}); \ No newline at end of file