Skip to content

Commit 7722bc4

Browse files
committed
Fix bug with multiple file paths
1 parent 5dfaa4a commit 7722bc4

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/globber.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,20 @@ function globber(paths) {
77
files.fileEvents = [];
88

99
const Glob = glob.Glob;
10+
let doneCount = 0;
1011

1112
paths.forEach(function (path) {
13+
console.log("Rampaging " + path);
1214
const fileEvents = new Glob(path);
1315

1416
fileEvents.on('match', function (file) {
1517
files.onNext(file);
1618
});
1719

1820
fileEvents.on('end', function () {
19-
files.onCompleted();
21+
if (++doneCount === paths.length) {
22+
files.onCompleted();
23+
}
2024
});
2125

2226
files.fileEvents.push(fileEvents);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "test262-harness",
33
"repository": "bterlson/test262-harness",
4-
"version": "2.0.3",
4+
"version": "2.0.4",
55
"description": "Node-based harness for test262",
66
"main": "index.js",
77
"bin": {

0 commit comments

Comments
 (0)