提交 1fa2d91f 编写于 作者: D Daniel Imms

Add integration test

上级 0358f180
......@@ -354,4 +354,19 @@ suite('window namespace tests', () => {
test('terminal, name should set terminal.name', () => {
assert.equal(window.createTerminal('foo').name, 'foo');
});
test('terminal, listening to onData should report data from the pty process', done => {
const terminal = window.createTerminal();
let fromPty = '';
let isFinished = false;
(<any>terminal).onData(data => {
// The text could be split over multiple callbacks
fromPty += data;
if (!isFinished && fromPty.indexOf('test') >= 0) {
isFinished = true;
done();
}
});
terminal.sendText('test');
});
});
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册