Skip to content

Commit cf24747

Browse files
committed
Loosen test to allow for shell output
1 parent abd7820 commit cf24747

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { deepStrictEqual, doesNotThrow, equal, strictEqual, throws } from 'assert';
6+
import { deepStrictEqual, doesNotThrow, equal, ok, strictEqual, throws } from 'assert';
77
import { ConfigurationTarget, Disposable, env, EnvironmentVariableCollection, EnvironmentVariableMutator, EnvironmentVariableMutatorOptions, EnvironmentVariableMutatorType, EnvironmentVariableScope, EventEmitter, ExtensionContext, extensions, ExtensionTerminalOptions, Pseudoterminal, Terminal, TerminalDimensions, TerminalExitReason, TerminalOptions, TerminalState, UIKind, Uri, window, workspace } from 'vscode';
88
import { assertNoRpc, poll } from '../utils';
99

@@ -368,11 +368,12 @@ import { assertNoRpc, poll } from '../utils';
368368
try {
369369
if (closeEvents.length === 1) {
370370
deepStrictEqual(openEvents, ['test1']);
371-
deepStrictEqual(dataEvents, [{ name: 'test1', data: 'write1' }]);
371+
ok(dataEvents.some(e => e.name === 'test1' && e.data === 'write1'));
372372
deepStrictEqual(closeEvents, ['test1']);
373373
} else if (closeEvents.length === 2) {
374374
deepStrictEqual(openEvents, ['test1', 'test2']);
375-
deepStrictEqual(dataEvents, [{ name: 'test1', data: 'write1' }, { name: 'test2', data: 'write2' }]);
375+
ok(dataEvents.some(e => e.name === 'test1' && e.data === 'write1'));
376+
ok(dataEvents.some(e => e.name === 'test2' && e.data === 'write2'));
376377
deepStrictEqual(closeEvents, ['test1', 'test2']);
377378
}
378379
resolveOnceClosed!();

0 commit comments

Comments
 (0)