mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Fix for run extension tests with commonjs
This commit is contained in:
parent
0587f20cd7
commit
341122a111
13
test/all.js
13
test/all.js
|
@ -50,7 +50,7 @@ function loadClientTests(cb) {
|
|||
return file.replace(/\.js$/, '');
|
||||
});
|
||||
|
||||
// load all modules
|
||||
// load all modules with the AMD loader
|
||||
define(modules, function () {
|
||||
cb(null);
|
||||
}, cb);
|
||||
|
@ -61,13 +61,12 @@ function loadPluginTests(cb) {
|
|||
var root = path.join(path.dirname(__dirname), 'extensions');
|
||||
glob(TEST_GLOB, { cwd: root }, function (err, files) {
|
||||
|
||||
// load modules with commonjs
|
||||
var modules = files.map(function (file) {
|
||||
return 'extensions/' + file.replace(/\.js$/, '');
|
||||
return '../extensions/' + file.replace(/\.js$/, '');
|
||||
});
|
||||
|
||||
define(modules, function() {
|
||||
cb(null);
|
||||
}, cb);
|
||||
modules.forEach(require);
|
||||
cb(null);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -142,7 +141,7 @@ function main() {
|
|||
}));
|
||||
} else {
|
||||
loadTasks.push(loadClientTests);
|
||||
//loadTasks.push(loadPluginTests);
|
||||
loadTasks.push(loadPluginTests);
|
||||
}
|
||||
|
||||
async.parallel(loadTasks, function (err) {
|
||||
|
|
|
@ -2,4 +2,3 @@
|
|||
--ui tdd
|
||||
--reporter dot
|
||||
test/all.js
|
||||
extensions/**/test/*.test.js
|
||||
|
|
Loading…
Reference in a new issue