test(#775): add regression test for issue #775

This commit is contained in:
Ben Heidemann 2021-04-18 14:32:38 +01:00 committed by bcheidemann
parent 21e7a4750a
commit 36ed81d77c
2 changed files with 20 additions and 0 deletions

19
tests/bugs/issue775.js Normal file
View File

@ -0,0 +1,19 @@
'use strict';
const util = require('../lib/test-utils.js');
describe('fs.readdir fails when passing options, issue775', function () {
beforeEach(util.setup);
afterEach(util.cleanup);
it('should create a directory then call fs.readdir with options', function (done) {
const fs = util.fs();
fs.mkdir('/test_dir', undefined, (err) => {
if (err) {
done(err);
}
else {
fs.readdir('/test_dir', { withFileTypes: true }, done);
}
});
});
});

View File

@ -92,6 +92,7 @@ require('./bugs/issue270.js');
require('./bugs/rename-dir-trailing-slash.js');
require('./bugs/issue357.js');
require('./bugs/issue773.js');
require('./bugs/issue775.js');
require('./bugs/issue776.js');
// Sample code from README