From 932ad33958722548cb8f723b3f95c101e4ffbc01 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 26 Jun 2019 13:29:28 -0700 Subject: [PATCH] =?UTF-8?q?cli-test:=20fs.unlink=20=E2=86=92=20fs.unlinkSy?= =?UTF-8?q?nc=20to=20fix=20test=20failure=20on=20Node=2010=20(#701)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- test/cli-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cli-test.js b/test/cli-test.js index 1e78eea53..11edc1543 100644 --- a/test/cli-test.js +++ b/test/cli-test.js @@ -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(); }); });