tests: Aggressively filter out non-.js files
This prevents errors when the directory contains Emacs backup files.
This commit is contained in:
parent
7f79d201e6
commit
4a25559a2d
1 changed files with 2 additions and 2 deletions
|
@ -13,8 +13,8 @@ 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))
|
||||
// Keep only *.js files
|
||||
files = files.filter((f) => f.endsWith('.js'));
|
||||
|
||||
console.debug("Sent browser the following test specs:", files);
|
||||
res.setHeader('content-type', 'text/javascript');
|
||||
|
|
Loading…
Reference in a new issue