test: add regression test for issue 773

This commit is contained in:
Ben Heidemann 2021-04-10 12:43:31 +01:00 committed by David Humphrey
parent 3e88aeca92
commit 6590cb79bd
2 changed files with 17 additions and 0 deletions

16
tests/bugs/issue773.js Normal file
View File

@ -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();
});
});
});

View File

@ -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');