mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-23 00:22:56 +01:00
Move into monaco-languages folder
This commit is contained in:
parent
862f1c607e
commit
2249f929c6
258 changed files with 0 additions and 0 deletions
57
monaco-languages/test/all.js
Normal file
57
monaco-languages/test/all.js
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
const requirejs = require('requirejs');
|
||||
const jsdom = require('jsdom');
|
||||
const glob = require('glob');
|
||||
const path = require('path');
|
||||
|
||||
requirejs.config({
|
||||
baseUrl: '',
|
||||
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
|
||||
});
|
||||
|
||||
const tmp = new jsdom.JSDOM('<!DOCTYPE html><html><body></body></html>');
|
||||
global.document = tmp.window.document;
|
||||
global.navigator = tmp.window.navigator;
|
||||
global.self = global;
|
||||
global.document.queryCommandSupported = function () {
|
||||
return false;
|
||||
};
|
||||
global.window = {
|
||||
location: {},
|
||||
navigator: tmp.window.navigator,
|
||||
matchMedia: function () {
|
||||
return {
|
||||
matches: false,
|
||||
addListener: function () {}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
requirejs(
|
||||
['./test/setup'],
|
||||
function () {
|
||||
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);
|
||||
}
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue