From 4eec68fbdd1a5186e7738a7843dd4a33d31b11c1 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sun, 22 Mar 2020 17:41:57 +0000 Subject: [PATCH] tests: ignore vim swap files This helps during plugin development, which otherwise which break when a developer is editing a test. --- src/node/hooks/express/tests.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/node/hooks/express/tests.js b/src/node/hooks/express/tests.js index 443e9f685..514390962 100644 --- a/src/node/hooks/express/tests.js +++ b/src/node/hooks/express/tests.js @@ -12,6 +12,10 @@ exports.expressCreateServer = function (hook_name, args, cb) { // merge the two sets of results let files = [].concat(coreTests, pluginTests).sort(); + + // Remove swap files from tests + files = files.filter(el => !/\.swp$/.test(el)) + console.debug("Sent browser the following test specs:", files); res.send("var specs_list = " + JSON.stringify(files) + ";\n"); });