Skip to content

Commit

Permalink
fix(IsolatedTestRunner) Add ears on child process to prevent it from …
Browse files Browse the repository at this point in the history
…dying

because the stream overflows
  • Loading branch information
nicojs committed Apr 7, 2016
1 parent e16339e commit 687a0dd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/isolated-runner/IsolatedTestRunnerAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ export default class TestRunnerChildProcessAdapter extends TestRunner {
}

private listenToWorkerProcess() {

if (this.workerProcess.stdout) {
this.workerProcess.stdout.on('data', (data: any) => { /* do nothing */ });
}
if (this.workerProcess.stderr) {
this.workerProcess.stderr.on('data', (data: any) => {
console.log('ERROR: ' + data);
});
}

this.workerProcess.on('message', (message: Message<any>) => {
this.clearCurrentTimer();
switch (message.type) {
Expand Down

0 comments on commit 687a0dd

Please sign in to comment.