mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-02 01:25:39 -05:00
Merge from vscode e3c4990c67c40213af168300d1cfeb71d680f877 (#16569)
This commit is contained in:
@@ -146,7 +146,7 @@ function consoleLogFn(msg) {
|
||||
}
|
||||
|
||||
async function runTestsInBrowser(testModules, browserType) {
|
||||
const args = process.platform === 'linux' && browserType === 'chromium' ? ['--no-sandbox'] : undefined; // disable sandbox to run chrome on certain Linux distros
|
||||
const args = process.platform === 'linux' && browserType === 'chromium' ? ['--disable-setuid-sandbox'] : undefined; // setuid sandboxes requires root and is used in containers so we disable this to support our CI
|
||||
const browser = await playwright[browserType].launch({ headless: !Boolean(argv.debug), args });
|
||||
const context = await browser.newContext();
|
||||
const page = await context.newPage();
|
||||
|
||||
@@ -53,9 +53,10 @@
|
||||
paths: {
|
||||
vs: new URL(`../../../${!!isBuild ? 'out-build' : 'out'}/vs`, baseUrl).href,
|
||||
assert: new URL('../assert.js', baseUrl).href,
|
||||
sinon: new URL('../../../node_modules/sinon/pkg/sinon-1.17.7.js', baseUrl).href,
|
||||
sinon: new URL('../../../node_modules/sinon/pkg/sinon.js', baseUrl).href,
|
||||
'sinon-test': new URL('../../../node_modules/sinon-test/dist/sinon-test.js', baseUrl).href,
|
||||
xterm: new URL('../../../node_modules/xterm/lib/xterm.js', baseUrl).href,
|
||||
sql: new URL(`../../../${!!isBuild ? 'out-build' : 'out'}/sql`, baseUrl).href,
|
||||
sql: new URL(`../../../${!!isBuild ? 'out-build' : 'out'}/sql`, baseUrl).href, // {{SQL CARBON EDIT}}
|
||||
'iconv-lite-umd': new URL('../../../node_modules/iconv-lite-umd/lib/iconv-lite-umd.js', baseUrl).href,
|
||||
jschardet: new URL('../../../node_modules/jschardet/dist/jschardet.min.js', baseUrl).href
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ app.allowRendererProcessReuse = false;
|
||||
|
||||
const optimist = require('optimist')
|
||||
.describe('grep', 'only run tests matching <pattern>').alias('grep', 'g').alias('grep', 'f').string('grep')
|
||||
.describe('invert', 'uses the inverse of the match specified by grep').alias('invert', 'i').string('invert')
|
||||
.describe('invert', 'uses the inverse of the match specified by grep').alias('invert', 'i').string('invert') // {{SQL CARBON EDIT}}
|
||||
.describe('run', 'only run tests from <file>').string('run')
|
||||
.describe('runGlob', 'only run tests matching <file_pattern>').alias('runGlob', 'glob').alias('runGlob', 'runGrep').string('runGlob')
|
||||
.describe('build', 'run with build output (out-build)').boolean('build')
|
||||
@@ -177,7 +177,6 @@ app.on('ready', () => {
|
||||
nodeIntegration: true,
|
||||
contextIsolation: false,
|
||||
enableWebSQL: false,
|
||||
enableRemoteModule: false,
|
||||
spellcheck: false,
|
||||
nativeWindowOpen: true,
|
||||
webviewTag: true
|
||||
|
||||
@@ -176,6 +176,7 @@ function loadTests(opts) {
|
||||
|
||||
// collect unexpected errors
|
||||
loader.require(['vs/base/common/errors'], function (errors) {
|
||||
// {{SQL CARBON EDIT}}
|
||||
global.window.addEventListener('unhandledrejection', event => {
|
||||
errors.onUnexpectedError(event.reason);
|
||||
event.preventDefault();
|
||||
@@ -297,6 +298,7 @@ function runTests(opts) {
|
||||
return loadTests(opts).then(() => {
|
||||
|
||||
if (opts.grep) {
|
||||
// {{SQL CARBON EDIT}}
|
||||
mocha.grep(new RegExp(opts.grep));
|
||||
if (opts.invert) {
|
||||
mocha.invert();
|
||||
|
||||
@@ -170,6 +170,7 @@ function main() {
|
||||
|
||||
// replace the default unexpected error handler to be useful during tests
|
||||
loader(['vs/base/common/errors'], function (errors) {
|
||||
// {{SQL CARBON EDIT}}
|
||||
global.window.addEventListener('unhandledrejection', event => {
|
||||
errors.onUnexpectedError(event.reason);
|
||||
event.preventDefault();
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
baseUrl: '/out',
|
||||
paths: {
|
||||
assert: '/test/unit/assert.js',
|
||||
sinon: '/node_modules/sinon/pkg/sinon-1.17.7.js'
|
||||
sinon: '/node_modules/sinon/pkg/sinon.js',
|
||||
'sinon-test': '/node_modules/sinon-test/dist/sinon-test.js'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user