Skip to content

Commit 5094cf0

Browse files
committed
Add test for onDidCloseTerminal
Part of microsoft#10925
1 parent e3831ee commit 5094cf0

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

extensions/vscode-api-tests/src/window.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,4 +280,13 @@ suite('window namespace tests', () => {
280280
// This should not throw an exception
281281
terminal.sendText('echo "foo"');
282282
});
283+
284+
test('onDidCloseTerminal, event fires when terminal is disposed', (done) => {
285+
var terminal = window.createTerminal();
286+
window.onDidCloseTerminal((eventTerminal) => {
287+
assert.equal(terminal, eventTerminal);
288+
done();
289+
});
290+
terminal.dispose();
291+
});
283292
});

0 commit comments

Comments
 (0)