diff --git a/tests/bugs/issue773.js b/tests/bugs/issue773.js new file mode 100644 index 0000000..14dfeac --- /dev/null +++ b/tests/bugs/issue773.js @@ -0,0 +1,16 @@ + +'use strict'; +const util = require('../lib/test-utils.js'); +const expect = require('chai').expect; + +describe('unexpected failures when calling fs functions (e.g. writeFile) with empty options object, issue773', function() { + beforeEach(util.setup); + afterEach(util.cleanup); + + it('should call fs.writeFile with an empty options object', function(done) { + const fs = util.fs(); + fs.writeFile('/a', 'trololol', {}, (err) => { + done(); + }); + }); +}); diff --git a/tests/index.js b/tests/index.js index e9245e6..4287ccc 100644 --- a/tests/index.js +++ b/tests/index.js @@ -89,6 +89,7 @@ require('./bugs/issue267.js'); require('./bugs/issue270.js'); require('./bugs/rename-dir-trailing-slash.js'); require('./bugs/issue357.js'); +require('./bugs/issue773.js'); // Sample code from README require('./spec/readme.example.spec');