mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 00:59:03 +01:00
Add listener to disposables array
This commit is contained in:
@@ -232,11 +232,11 @@ import { assertNoRpc } from '../utils';
|
||||
const terminal = window.createTerminal();
|
||||
deepStrictEqual(terminal.state, { interactedWith: false });
|
||||
const eventState = await new Promise<TerminalState>(r => {
|
||||
window.onDidChangeTerminalState(e => {
|
||||
disposables.push(window.onDidChangeTerminalState(e => {
|
||||
if (e.terminal === terminal) {
|
||||
r(e.state);
|
||||
}
|
||||
});
|
||||
}));
|
||||
terminal.sendText('test');
|
||||
});
|
||||
deepStrictEqual(eventState, { interactedWith: true });
|
||||
|
||||
Reference in New Issue
Block a user