diff --git a/tests/spec/fs.write.spec.js b/tests/spec/fs.write.spec.js index 63658ec..8a9cab2 100644 --- a/tests/spec/fs.write.spec.js +++ b/tests/spec/fs.write.spec.js @@ -4,6 +4,18 @@ var expect = require('chai').expect; describe('fs.write', function() { beforeEach(util.setup); afterEach(util.cleanup); + + // if the file is undefined, it will create problems + // + it('should be a error',function(done){ + var fs=util.fs(); + fs.writeFile(undefined, 'data', function(error) { + expect(error).to.exist; + expect(error.code).to.equal('EINVAL'); + done(); + }); + }); + it('should be a function', function() { var fs = util.fs();