提交 c8fc3e41 编写于 作者: D Daniel Imms

Clean up terminal api tests

上级 86028830
......@@ -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');
});
});
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册