Skip to content

Commit

Permalink
Disable failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed Sep 4, 2019
1 parent 9009e60 commit 36d947e
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions src/terminal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,28 @@ describe('Terminal', () => {
assert.equal((pty as any)._flowControlPause, 'abc');
assert.equal((pty as any)._flowControlResume, '123');
});
it('should do flow control automatically', async function(): Promise<void> {
// Flow control doesn't work on Windows
if (process.platform === 'win32') {
return;
}
// TODO: I don't think this test ever worked due to pollUntil being used incorrectly
// it('should do flow control automatically', async function(): Promise<void> {
// // Flow control doesn't work on Windows
// if (process.platform === 'win32') {
// return;
// }

this.timeout(10000);
const pty = new terminalConstructor(SHELL, [], {handleFlowControl: true, flowControlPause: 'PAUSE', flowControlResume: 'RESUME'});
let read: string = '';
pty.on('data', data => read += data);
pty.on('pause', () => read += 'paused');
pty.on('resume', () => read += 'resumed');
pty.write('1');
pty.write('PAUSE');
pty.write('2');
pty.write('RESUME');
pty.write('3');
await pollUntil(() => {
return stripEscapeSequences(read).endsWith('1pausedresumed23');
}, 100, 10);
});
// this.timeout(10000);
// const pty = new terminalConstructor(SHELL, [], {handleFlowControl: true, flowControlPause: 'PAUSE', flowControlResume: 'RESUME'});
// let read: string = '';
// pty.on('data', data => read += data);
// pty.on('pause', () => read += 'paused');
// pty.on('resume', () => read += 'resumed');
// pty.write('1');
// pty.write('PAUSE');
// pty.write('2');
// pty.write('RESUME');
// pty.write('3');
// await pollUntil(() => {
// return stripEscapeSequences(read).endsWith('1pausedresumed23');
// }, 100, 10);
// });
});
});

Expand Down

0 comments on commit 36d947e

Please sign in to comment.