Use the global monaco only in the AMD case (see microsoft/monaco-editor#1974)

This commit is contained in:
Alex Dima 2020-09-08 13:40:42 +02:00
parent 1af07d9cdb
commit d7cc098c48
No known key found for this signature in database
GPG key ID: 6E58D7B045760DA0
80 changed files with 347 additions and 387 deletions

View file

@ -8,6 +8,8 @@ requirejs.config({
paths: {
'vs/css': 'test/css.mock',
'vs/nls': 'test/nls.mock',
'out/amd/fillers/monaco-editor-core':
'out/amd/fillers/monaco-editor-core-amd',
vs: 'node_modules/monaco-editor-core/dev/vs'
},
nodeRequire: require
@ -25,25 +27,24 @@ global.window = { location: {}, navigator: tmp.window.navigator };
requirejs(
['./test/setup'],
function () {
glob(
'release/dev/*/*.test.js',
{ cwd: path.dirname(__dirname) },
function (err, files) {
if (err) {
console.log(err);
return;
}
requirejs(
files.map((f) => f.replace(/\.js$/, '')),
function () {
// We can launch the tests!
},
function (err) {
console.log(err);
}
);
glob('out/amd/*/*.test.js', { cwd: path.dirname(__dirname) }, function (
err,
files
) {
if (err) {
console.log(err);
return;
}
);
requirejs(
files.map((f) => f.replace(/\.js$/, '')),
function () {
// We can launch the tests!
},
function (err) {
console.log(err);
}
);
});
},
function (err) {
console.log(err);