Skip to content

Commit 6daf432

Browse files
committed
don't bundle lib/index.js before test files
- this is a relic from the circular-dependency era, - we use to have to do this in order to run test per-suite to setup the registry correctly. - this should speed bundling times in single-suite runs
1 parent 6c29290 commit 6daf432

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

test/jasmine/karma.conf.js

+2-13
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ if(isFullSuite) {
102102

103103
var pathToShortcutPath = path.join(__dirname, '..', '..', 'tasks', 'util', 'shortcut_paths.js');
104104
var pathToStrictD3 = path.join(__dirname, '..', '..', 'tasks', 'util', 'strict_d3.js');
105-
var pathToMain = path.join(__dirname, '..', '..', 'lib', 'index.js');
106105
var pathToJQuery = path.join(__dirname, 'assets', 'jquery-1.8.3.min.js');
107106
var pathToIE9mock = path.join(__dirname, 'assets', 'ie9_mock.js');
108107
var pathToCustomMatchers = path.join(__dirname, 'assets', 'custom_matchers.js');
@@ -252,10 +251,7 @@ func.defaultConfig = {
252251

253252
func.defaultConfig.preprocessors[pathToCustomMatchers] = ['browserify'];
254253

255-
if(isFullSuite) {
256-
func.defaultConfig.files.push(pathToJQuery);
257-
func.defaultConfig.preprocessors[testFileGlob] = ['browserify'];
258-
} else if(isBundleTest) {
254+
if(isBundleTest) {
259255
switch(basename(testFileGlob)) {
260256
case 'requirejs':
261257
// browserified custom_matchers doesn't work with this route
@@ -282,14 +278,7 @@ if(isFullSuite) {
282278
break;
283279
}
284280
} else {
285-
// Add lib/index.js to non-full-suite runs,
286-
// to make sure the registry is set-up correctly.
287-
func.defaultConfig.files.push(
288-
pathToJQuery,
289-
pathToMain
290-
);
291-
292-
func.defaultConfig.preprocessors[pathToMain] = ['browserify'];
281+
func.defaultConfig.files.push(pathToJQuery);
293282
func.defaultConfig.preprocessors[testFileGlob] = ['browserify'];
294283
}
295284

0 commit comments

Comments
 (0)