From 67ba4188988acb6baee8e18e3d2c48a7762c2aa0 Mon Sep 17 00:00:00 2001 From: Ra'Shaun Stovall Date: Thu, 21 Sep 2017 18:02:46 -0700 Subject: [PATCH] [Breaking] use default `require.extensions` collection instead of the magic Array `['.js']` Fixes #137. --- bin/tape | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/tape b/bin/tape index 2f519d90..e2604d7e 100755 --- a/bin/tape +++ b/bin/tape @@ -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)); } });