Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Commit ecdad2a

Browse files
explicitly kill the child process after the test has run
1 parent 8b75066 commit ecdad2a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

bin/codecov

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var args = argv.option([
2323

2424
// listen for piped input for 500ms
2525
var listeningTime = 500;
26-
/*process.stdin.setEncoding('utf8');
26+
process.stdin.setEncoding('utf8');
2727
process.stdin.on('data', function(report) {
2828
if (report !== null) {
2929
clearTimeout(timer);
@@ -34,5 +34,5 @@ process.stdin.on('data', function(report) {
3434
process.stdin.on('end', function() {
3535
codecov.upload(args);
3636
});
37-
*/
37+
3838
var timer = setTimeout(codecov.upload, listeningTime, args)

test/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,10 @@ describe("Codecov", function(){
128128

129129
it("can read piped reports", function(done){
130130
var exec = require('child_process').exec;
131-
exec('cat test/example.coverage.txt | bin/codecov --dump --disable=gcov', function(err, stdout, stderr){
131+
var childProcess = exec('cat test/example.coverage.txt | bin/codecov --dump --disable=gcov', function(err, stdout, stderr){
132132
expect(stdout.toString()).to.contain('path=piped');
133133
expect(stdout.toString()).to.contain('this file is intentionally left blank');
134+
childProcess.kill();
134135
done();
135136
});
136137
});

0 commit comments

Comments
 (0)