Skip to content

Commit

Permalink
[Fix] fix spurious "test exited without ending"
Browse files Browse the repository at this point in the history
Fixes #223.

@Raynos identified this line as the issue: #223 (comment)

Let's finally fix this :)
  • Loading branch information
feross authored and ljharb committed Jun 26, 2017
1 parent 1a8e936 commit dd93216
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions bin/tape
Expand Up @@ -26,10 +26,12 @@ opts.require.forEach(function(module) {
});

opts._.forEach(function (arg) {
glob(arg, function (err, files) {
files.forEach(function (file) {
require(resolvePath(cwd, file));
});
// If glob does not match, `files` will be an empty array.
// Note: `glob.sync` may throw an error and crash the node process.
var files = glob.sync(arg);

files.forEach(function (file) {
require(resolvePath(cwd, file));
});
});

Expand Down

0 comments on commit dd93216

Please sign in to comment.