From 5b36fadec9bb4a8ba6c844bca385bc76eea13fee Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Wed, 20 Mar 2019 16:32:05 +1100 Subject: [PATCH] DEV: correct qunit runner for autospec Was no longer working on latest nodes, unlink expects a callback Also cleans up eslint warnings. --- test/run-qunit.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/run-qunit.js b/test/run-qunit.js index f7eb97c50c0..e1588373088 100644 --- a/test/run-qunit.js +++ b/test/run-qunit.js @@ -1,3 +1,5 @@ +/*eslint no-console: ["error", { allow: ["log", "error"] }] */ + // Chrome QUnit Test Runner // Author: David Taylor // Requires chrome-launcher and chrome-remote-interface from npm @@ -21,7 +23,12 @@ const fs = require("fs"); if (QUNIT_RESULT) { (async () => { await fs.stat(QUNIT_RESULT, (err, stats) => { - if (stats && stats.isFile()) fs.unlink(QUNIT_RESULT); + if (stats && stats.isFile()) + fs.unlink(QUNIT_RESULT, unlinkErr => { + if (unlinkErr) { + console.log("Error deleting " + QUNIT_RESULT + " " + unlinkErr); + } + }); }); })(); }