mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 08:38:56 +01:00
Add test for onDidChangeActiveTerminal
This commit is contained in:
@@ -583,5 +583,20 @@ suite('window namespace tests', () => {
|
||||
});
|
||||
const renderer = window.createTerminalRenderer('foo');
|
||||
});
|
||||
|
||||
test('onDidChangeActiveTerminal should fire when new terminals are created', (done) => {
|
||||
const reg1 = window.onDidChangeActiveTerminal((active: Terminal | undefined) => {
|
||||
assert.equal(active, terminal);
|
||||
reg1.dispose();
|
||||
const reg2 = window.onDidChangeActiveTerminal((active: Terminal | undefined) => {
|
||||
assert.equal(active, undefined);
|
||||
reg2.dispose();
|
||||
done();
|
||||
});
|
||||
terminal.dispose();
|
||||
});
|
||||
const terminal = window.createTerminal();
|
||||
terminal.show();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user