mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-27 13:40:25 +00:00
Clean up terminal api tests
This commit is contained in:
@@ -319,14 +319,13 @@ suite('window namespace tests', () => {
|
||||
}, 'Terminal.name should be readonly');
|
||||
});
|
||||
|
||||
test('createTerminal, immediate Terminal.sendText', () => {
|
||||
var terminal = window.createTerminal();
|
||||
// This should not throw an exception
|
||||
terminal.sendText('echo "foo"');
|
||||
test('terminal, sendText immediately after createTerminal should not throw', () => {
|
||||
const terminal = window.createTerminal();
|
||||
assert.doesNotThrow(terminal.sendText.bind(terminal, 'echo "foo"'));
|
||||
});
|
||||
|
||||
test('onDidCloseTerminal, event fires when terminal is disposed', (done) => {
|
||||
var terminal = window.createTerminal();
|
||||
test('terminal, onDidCloseTerminal event fires when terminal is disposed', (done) => {
|
||||
const terminal = window.createTerminal();
|
||||
window.onDidCloseTerminal((eventTerminal) => {
|
||||
assert.equal(terminal, eventTerminal);
|
||||
done();
|
||||
@@ -334,10 +333,14 @@ suite('window namespace tests', () => {
|
||||
terminal.dispose();
|
||||
});
|
||||
|
||||
test('createTerminal, immediate Terminal.processId', (done) => {
|
||||
test('terminal, processId immediately after createTerminal should fetch the pid', (done) => {
|
||||
window.createTerminal().processId.then(id => {
|
||||
assert.ok(id > 0);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test('terminal, name should set terminal.name', () => {
|
||||
assert.equal(window.createTerminal('foo').name, 'foo');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user