style: fix linting issues and invoke done with error if error is captured

This commit is contained in:
Ben Heidemann 2021-04-10 12:47:08 +01:00 committed by David Humphrey
parent 6590cb79bd
commit cef6adfc37
1 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,5 @@
'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);
@ -10,6 +8,10 @@ describe('unexpected failures when calling fs functions (e.g. writeFile) with em
it('should call fs.writeFile with an empty options object', function(done) {
const fs = util.fs();
fs.writeFile('/a', 'trololol', {}, (err) => {
if (err) {
done(err);
return;
}
done();
});
});