From 767f9c6bcedf1ae87d759a84be1e2208ff59ecb8 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 1 May 2016 23:37:13 -0700 Subject: [PATCH] Simplify module assignment. --- test/test.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/test.js b/test/test.js index 1fab8ebff..1a71a75a7 100644 --- a/test/test.js +++ b/test/test.js @@ -692,10 +692,8 @@ '_ListCache', '_MapCache', '_Stack' - ], function(relPath) { - var func = require(path.join(basePath, relPath)), - funcName = path.basename(relPath); - + ], function(funcName) { + var func = require(path.join(basePath, funcName)); _['_' + funcName] = func[funcName] || func['default'] || func; }); }