mirror of
https://github.com/microsoft/monaco-editor.git
synced 2024-11-25 16:35:44 +08:00
addd code
This commit is contained in:
parent
b07209d651
commit
2a91ff723a
@ -14,7 +14,7 @@ const path = require('path');
|
||||
/** @typedef {import('./common').PackagerKind} PackagerKind */
|
||||
/** @typedef {import('./common').TestInfo} TestInfo */
|
||||
|
||||
const DEBUG_TESTS = process.argv.includes('--debug-tests');
|
||||
const DEBUG_TESTS = true; // process.argv.includes('--debug-tests');
|
||||
const REPO_ROOT = path.join(__dirname, '../../');
|
||||
const PORT = 8563;
|
||||
|
||||
@ -42,7 +42,7 @@ async function runTests() {
|
||||
// uncomment to shortcircuit and run a specific combo
|
||||
// await runTest('webpack', 'chromium'); return;
|
||||
/** @type {PackagerKind[]} */
|
||||
const testTypes = ['amd', 'webpack', 'esbuild', 'vite'];
|
||||
const testTypes = ['webpack'];
|
||||
// TODO: add parcel! (this currently fails because parcel replaces process with {})
|
||||
|
||||
for (const type of testTypes) {
|
||||
@ -75,7 +75,7 @@ function runTest(packager, browser) {
|
||||
'--no-delay',
|
||||
'--headless',
|
||||
'--timeout',
|
||||
'20000'
|
||||
'2000000'
|
||||
],
|
||||
{
|
||||
env,
|
||||
|
@ -113,17 +113,24 @@ suite(`Smoke Test '${testInfo.packager}' on '${testInfo.browser}'`, () => {
|
||||
});
|
||||
|
||||
test('should be able to create plaintext editor', async function () {
|
||||
console.log('inside of test');
|
||||
console.log('REPO_ROOT : ', __dirname + '../../');
|
||||
|
||||
await createEditor('hello world', 'plaintext');
|
||||
|
||||
// type a link in it
|
||||
await setEditorPosition(1, 12);
|
||||
await triggerEditorCommand('type', { text: '\nhttps://www.microsoft.com' });
|
||||
|
||||
console.log('triggerEditorCommand');
|
||||
|
||||
// check that the link gets highlighted, which indicates that the web worker is healthy
|
||||
await page.waitForSelector('.detected-link');
|
||||
});
|
||||
|
||||
test('css smoke test', async function () {
|
||||
console.log('css smoke test');
|
||||
|
||||
await createEditor('.sel1 { background: red; }\\n.sel2 {}', 'css');
|
||||
|
||||
// check that a squiggle appears, which indicates that the language service is up and running
|
||||
|
@ -22,6 +22,7 @@ global.document.queryCommandSupported = function () {
|
||||
return false;
|
||||
};
|
||||
global.UIEvent = tmp.window.UIEvent;
|
||||
global._VSCODE_FILE_ROOT = '';
|
||||
|
||||
global.window = {
|
||||
location: {},
|
||||
|
Loading…
Reference in New Issue
Block a user