mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 08:10:11 +01:00
Restore monaco-languages test running
This commit is contained in:
parent
cf554e8cf9
commit
57e5156385
5 changed files with 40 additions and 31 deletions
20
.vscode/launch.json
vendored
Normal file
20
.vscode/launch.json
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "pwa-node",
|
||||
"request": "launch",
|
||||
"name": "Monaco Languages Unit Tests",
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"program": "${workspaceFolder}\\monaco-languages\\test\\all.js",
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/**/*.js"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
26
monaco-languages/.vscode/launch.json
vendored
26
monaco-languages/.vscode/launch.json
vendored
|
|
@ -1,26 +0,0 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Unit Tests",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"program": "./test/all.js",
|
||||
"stopOnEntry": false,
|
||||
"args": [
|
||||
// "--grep",
|
||||
// "typescript"
|
||||
],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"preLaunchTask": null,
|
||||
"runtimeExecutable": null,
|
||||
"runtimeArgs": ["--nolazy"],
|
||||
"env": {
|
||||
"NODE_ENV": "development"
|
||||
},
|
||||
"console": "internalConsole",
|
||||
"sourceMaps": false,
|
||||
"outDir": null
|
||||
}
|
||||
]
|
||||
}
|
||||
12
monaco-languages/src/fillers/monaco-editor-core-amd.ts
Normal file
12
monaco-languages/src/fillers/monaco-editor-core-amd.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Resolves with the global monaco API
|
||||
|
||||
declare var define: any;
|
||||
|
||||
define([], function () {
|
||||
return (<any>self).monaco;
|
||||
});
|
||||
|
|
@ -4,17 +4,19 @@ const glob = require('glob');
|
|||
const path = require('path');
|
||||
|
||||
requirejs.config({
|
||||
baseUrl: '',
|
||||
baseUrl: 'monaco-languages',
|
||||
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'
|
||||
'vs/basic-languages/fillers/monaco-editor-core': 'out/amd/fillers/monaco-editor-core-amd',
|
||||
'vs/basic-languages': 'out/amd',
|
||||
vs: '../node_modules/monaco-editor-core/dev/vs'
|
||||
},
|
||||
nodeRequire: require
|
||||
});
|
||||
|
||||
const tmp = new jsdom.JSDOM('<!DOCTYPE html><html><body></body></html>');
|
||||
global.AMD = true;
|
||||
global.document = tmp.window.document;
|
||||
global.navigator = tmp.window.navigator;
|
||||
global.self = global;
|
||||
|
|
@ -33,7 +35,7 @@ global.window = {
|
|||
};
|
||||
|
||||
requirejs(
|
||||
['./test/setup'],
|
||||
['test/setup'],
|
||||
function () {
|
||||
glob('out/amd/*/*.test.js', { cwd: path.dirname(__dirname) }, function (err, files) {
|
||||
if (err) {
|
||||
|
|
@ -41,7 +43,7 @@ requirejs(
|
|||
return;
|
||||
}
|
||||
requirejs(
|
||||
files.map((f) => f.replace(/\.js$/, '')),
|
||||
files.map((f) => f.replace(/^out\/amd/, 'vs/basic-languages').replace(/\.js$/, '')),
|
||||
function () {
|
||||
// We can launch the tests!
|
||||
},
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
"release-languages": "node ./monaco-languages/build",
|
||||
"release-typescript": "node ./monaco-typescript/build",
|
||||
"release-plugins": "npm-run-all -lp release-css release-html release-json release-languages release-typescript",
|
||||
"test": "node ./monaco-languages/test/all.js",
|
||||
"gulp-release": "gulp release",
|
||||
"release": "npm-run-all -ls release-plugins gulp-release",
|
||||
"website": "gulp build-website && npm run typedoc && gulp prepare-website-branch",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue