Merge branch 'master' into issue#2456

This commit is contained in:
Daniel Imms
2019-10-22 07:17:47 -07:00
committed by GitHub
4 changed files with 21 additions and 13 deletions
+5 -5
View File
@@ -20,7 +20,7 @@ jobs:
yarn
displayName: 'Install dependencies and build'
- script: |
yarn test-unit
yarn test-unit --forbid-only
displayName: 'Unit tests'
- script: |
yarn lint
@@ -38,7 +38,7 @@ jobs:
yarn
displayName: 'Install dependencies and build'
- script: |
yarn test-unit
yarn test-unit --forbid-only
displayName: 'Unit tests'
- script: |
yarn lint
@@ -56,7 +56,7 @@ jobs:
yarn
displayName: 'Install dependencies and build'
- script: |
yarn test-unit
yarn test-unit --forbid-only
displayName: 'Unit tests'
- script: |
yarn lint
@@ -80,7 +80,7 @@ jobs:
- script: |
yarn start &
sleep 10
yarn test-api --headless
yarn test-api --headless --forbid-only
displayName: 'Linux Integration tests'
- job: macOS_IntegrationTests
@@ -97,7 +97,7 @@ jobs:
- script: |
yarn start &
sleep 10
yarn test-api --headless
yarn test-api --headless --forbid-only
displayName: 'MacOS Integration tests'
- job: Release
+12 -5
View File
@@ -15,15 +15,22 @@ let testFiles = [
'./out/**/*test.js'
];
// ability to inject particular test files via
// yarn test [testFileA testFileB ...]
let flagArgs = [];
if (process.argv.length > 2) {
testFiles = process.argv.slice(2);
const args = process.argv.slice(2);
flagArgs = args.filter(e => e.startsWith('--'));
// ability to inject particular test files via
// yarn test [testFileA testFileB ...]
files = args.filter(e => !e.startsWith('--'));
if (files.length) {
testFiles = files;
}
}
const run = cp.spawnSync(
path.resolve(__dirname, '../node_modules/.bin/mocha'),
testFiles,
[...testFiles, ...flagArgs],
{
cwd: path.resolve(__dirname, '..'),
env,
@@ -31,4 +38,4 @@ const run = cp.spawnSync(
}
);
process.exit(run.status);
process.exit(run.status);
+4
View File
@@ -508,6 +508,10 @@ export class Terminal extends Disposable implements ITerminal, IDisposable, IInp
throw new Error('Terminal requires a parent element.');
}
if (!document.body.contains(parent)) {
this._logService.warn('Terminal.open was called on an element that was not attached to the DOM');
}
this._document = this._parent.ownerDocument;
// Create main element container
-3
View File
@@ -56,9 +56,6 @@ export class Terminal implements ITerminalApi {
this._core.resize(columns, rows);
}
public open(parent: HTMLElement): void {
if (!document.body.contains(parent)) {
throw new Error('open must be called on an element that is attached to the DOM');
}
this._core.open(parent);
}
public attachCustomKeyEventHandler(customKeyEventHandler: (event: KeyboardEvent) => boolean): void {