diff --git a/tests/bugs/issue773.js b/tests/bugs/issue773.js index 14dfeac..f5d3152 100644 --- a/tests/bugs/issue773.js +++ b/tests/bugs/issue773.js @@ -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(); }); });