mirror of
https://github.com/Microsoft/vscode
synced 2024-10-02 09:18:59 +00:00
tests - improve exclusion handling for node.js tests
This commit is contained in:
parent
aa69f3d762
commit
08ac1bb67c
|
@ -25,11 +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
|
||||
'vs/workbench/contrib/testing/test/common/testResultService.test.js' // flaky (https://github.com/microsoft/vscode/issues/137853)
|
||||
|
||||
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)
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -152,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$/, ''));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue