Skip to content

Commit

Permalink
[Breaking] use default require.extensions collection instead of the…
Browse files Browse the repository at this point in the history
… magic Array `['.js']`

Fixes #137.
  • Loading branch information
snuggs authored and ljharb committed Sep 22, 2017
1 parent b5b40ae commit 67ba418
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/tape
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ if (typeof opts.require === 'string') {
}

opts.require.forEach(function (module) {
var options = { basedir: cwd, extensions: Object.keys(require.extensions) };
if (module) {
/* This check ensures we ignore `-r ""`, trailing `-r`, or
* other silly things the user might (inadvertently) be doing.
*/
require(resolveModule(module, { basedir: cwd }));
require(resolveModule(module, options));
}
});

Expand Down

0 comments on commit 67ba418

Please sign in to comment.