Skip to content

Commit dd93216

Browse files
ferossljharb
authored andcommitted
[Fix] fix spurious "test exited without ending"
Fixes #223. @Raynos identified this line as the issue: #223 (comment) Let's finally fix this :)
1 parent 1a8e936 commit dd93216

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

bin/tape

+6-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@ opts.require.forEach(function(module) {
2626
});
2727

2828
opts._.forEach(function (arg) {
29-
glob(arg, function (err, files) {
30-
files.forEach(function (file) {
31-
require(resolvePath(cwd, file));
32-
});
29+
// If glob does not match, `files` will be an empty array.
30+
// Note: `glob.sync` may throw an error and crash the node process.
31+
var files = glob.sync(arg);
32+
33+
files.forEach(function (file) {
34+
require(resolvePath(cwd, file));
3335
});
3436
});
3537

0 commit comments

Comments
 (0)