mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 17:48:56 +01:00
Add integration test
This commit is contained in:
@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user