mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Add integration test for terminal dispose
This commit is contained in:
@@ -510,6 +510,20 @@ describe('API Integration Tests', function(): void {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('dispose', async function(): Promise<any> {
|
||||
await page.evaluate(`
|
||||
window.term = new Terminal();
|
||||
window.term.dispose();
|
||||
`);
|
||||
assert.equal(await page.evaluate(`window.term._core._isDisposed`), true);
|
||||
});
|
||||
|
||||
it('dispose (opened)', async function(): Promise<any> {
|
||||
await openTerminal();
|
||||
await page.evaluate(`window.term.dispose()`);
|
||||
assert.equal(await page.evaluate(`window.term._core._isDisposed`), true);
|
||||
});
|
||||
});
|
||||
|
||||
async function openTerminal(options: ITerminalOptions = {}): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user