From 0f1e69a2dfe1efbcab3900445a9350e5801add39 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sat, 28 Sep 2013 00:25:56 -0700 Subject: [PATCH] Tweak how `isModularize` is detected in test/test.js. --- test/test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test.js b/test/test.js index 76a55848f..d427ed4ab 100644 --- a/test/test.js +++ b/test/test.js @@ -36,6 +36,9 @@ return result; }()); + /** The basename of the Lo-Dash file to test */ + var basename = /[\w.-]+$/.exec(filePath)[0]; + /** The `ui` object */ var ui = root.ui || (root.ui = { 'buildPath': filePath, @@ -44,7 +47,7 @@ }); /** Used to indicate testing a modularized build */ - var isModularize = ui.isModularize || /\b(?:lodash-(?:amd|node)|modularize)\b/.test([ui.buildPath, ui.urlParams.build]); + var isModularize = ui.isModularize || /\b(?:commonjs|index\.js|lodash-(?:amd|node)|modularize)\b/.test([ui.buildPath, ui.urlParams.build, basename]); /*--------------------------------------------------------------------------*/ @@ -104,9 +107,6 @@ /** Use a single "load" function */ var load = !amd && typeof require == 'function' ? require : root.load; - /** The basename of the Lo-Dash file to test */ - var basename = /[\w.-]+$/.exec(filePath)[0]; - /** The unit testing framework */ var QUnit = (function() { var noop = Function.prototype;