diff options
Diffstat (limited to 'test/unit/node/index.js')
-rw-r--r-- | test/unit/node/index.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/unit/node/index.js b/test/unit/node/index.js index f423c6d64fd..fd55cea9d93 100644 --- a/test/unit/node/index.js +++ b/test/unit/node/index.js @@ -25,10 +25,12 @@ const optimist = require('optimist') const TEST_GLOB = '**/test/**/*.test.js'; -const excludeGlob = '**/{browser,electron-sandbox,electron-browser,electron-main}/**/*.test.js'; -const excludeModules = [ - 'vs/platform/environment/test/node/nativeModules.test.js', // native modules are compiled against Electron and this test would fail with node.js - 'vs/base/parts/storage/test/node/storage.test.js', // same as above, due to direct dependency to sqlite native module + +const excludeGlobs = [ + '**/{browser,electron-sandbox,electron-browser,electron-main}/**/*.test.js', + '**/vs/platform/environment/test/node/nativeModules.test.js', // native modules are compiled against Electron and this test would fail with node.js + '**/vs/base/parts/storage/test/node/storage.test.js', // same as above, due to direct dependency to sqlite native module + '**/vs/workbench/contrib/testing/test/**' // flaky (https://github.com/microsoft/vscode/issues/137853) ]; /** @@ -151,7 +153,7 @@ function main() { /** @type {string[]} */ const modules = []; for (let file of files) { - if (!minimatch(file, excludeGlob) && excludeModules.indexOf(file) === -1) { + if (!excludeGlobs.some(excludeGlob => minimatch(file, excludeGlob))) { modules.push(file.replace(/\.js$/, '')); } } |