Skip to content

Commit

Permalink
cli-test: fs.unlink → fs.unlinkSync to fix test failure on Node 10 (#701
Browse files Browse the repository at this point in the history
)

Fixes this failure:

      1) Mustache CLI without partials writes rendered template into the file specified by the third argument:
         Uncaught TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
          at makeCallback (fs.js:136:11)
          at Object.unlink (fs.js:943:14)
          at test/cli-test.js:86:12
          at ChildProcess.exithandler (child_process.js:285:7)
          at maybeClose (internal/child_process.js:982:16)
          at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
  • Loading branch information
andersk authored and phillipj committed Jun 26, 2019
1 parent 78eb820 commit 932ad33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/cli-test.js
Expand Up @@ -83,7 +83,7 @@ describe('Mustache CLI', function () {
assert.equal(stderr, '');
assert.equal(stdout, '');
assert.equal(fs.readFileSync(outputFile), expectedOutput);
fs.unlink('test/_files/cli_output.txt');
fs.unlinkSync('test/_files/cli_output.txt');
done();
});
});
Expand Down

0 comments on commit 932ad33

Please sign in to comment.