Skip to content

Commit 5085b39

Browse files
committed
remove console.log statementsif present from start of results
1 parent 7f8d511 commit 5085b39

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

test/isolate-test.js

+5-7
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function generateTopic(args, file) {
1919
});
2020
});
2121
}
22-
};
22+
}
2323

2424
function assertExecOk(r) {
2525
assert.isNull(r.err);
@@ -32,13 +32,11 @@ function assertExecNotOk(r) {
3232
function parseResults(stdout) {
3333
var results = stdout.split('\n');
3434

35-
36-
// win32 returns cmd. need to filter out
35+
// win32 may console.log data which need to filter out invalid JSON at start of results
36+
//TODO: do we need to filter out any console.log data as we are expecting only valid json
37+
// any console.log used for dedugging may break parseResults
3738
if(process.platform === 'win32') {
38-
39-
try {
40-
JSON.parse(results[0])
41-
} catch(e){
39+
while(results.length > 0 && results[0].charAt(0) !== '{') {
4240
results.shift();
4341
}
4442
}

0 commit comments

Comments
 (0)