tests: Aggressively filter out non-.js files
This prevents errors when the directory contains Emacs backup files.pull/4415/head
parent
7f79d201e6
commit
4a25559a2d
|
@ -13,8 +13,8 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
||||||
// merge the two sets of results
|
// merge the two sets of results
|
||||||
let files = [].concat(coreTests, pluginTests).sort();
|
let files = [].concat(coreTests, pluginTests).sort();
|
||||||
|
|
||||||
// Remove swap files from tests
|
// Keep only *.js files
|
||||||
files = files.filter(el => !/\.swp$/.test(el))
|
files = files.filter((f) => f.endsWith('.js'));
|
||||||
|
|
||||||
console.debug("Sent browser the following test specs:", files);
|
console.debug("Sent browser the following test specs:", files);
|
||||||
res.setHeader('content-type', 'text/javascript');
|
res.setHeader('content-type', 'text/javascript');
|
||||||
|
|
Loading…
Reference in New Issue