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

@@ -1,9 +1,8 @@
-%0A
 'use str
@@ -56,47 +56,8 @@
 s');
-%0Aconst expect = require('chai').expect;
 %0A%0Ade
@@ -387,16 +387,76 @@
 r) =%3E %7B%0A
+      if (err) %7B%0A        done(err);%0A        return;%0A      %7D%0A
       do

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