From dd84bca638489177de091421d9d973c370a570ed Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Wed, 28 Aug 2013 20:48:03 -0700 Subject: [PATCH] curl legacy loader Former-commit-id: 08c7c76abe03823e3cdb0e25f76c969fa073226e --- test/underscore.html | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/test/underscore.html b/test/underscore.html index 0a3d7ff92..b9f8d9b4a 100644 --- a/test/underscore.html +++ b/test/underscore.html @@ -89,7 +89,7 @@ return; } var reBasename = /[\w.-]+$/, - basePath = ('//' + location.hostname + location.pathname).replace(/\btest\/$/, ''), + basePath = ('//' + location.hostname + ':' + location.port + location.pathname).replace(/\btest\/$/, ''), modulePath = ui.buildPath.replace(/\.js$/, ''), moduleMain = modulePath.match(reBasename)[0]; @@ -97,10 +97,6 @@ ? '../modularize' : modulePath.replace(reBasename, ''); - var pluginPath = window.curl - ? ui.loaderPath.replace(reBasename, 'curl/plugin/js!') - : ''; - QUnit.config.autostart = false; // load Lo-Dash as a module @@ -112,18 +108,26 @@ 'name': 'lodash', 'location': locationPath, 'main': moduleMain + }, + { + 'name': 'test', + 'location': '../vendor/underscore/test', + 'config': { + 'loader': 'curl/loader/legacy', + 'exports': 'QUnit' // cheat to work around no global being exported, won't be able to detect 404s in IE + } } ] }, ['lodash'], function(lodash) { init(lodash); require([ - pluginPath + basePath + '/vendor/underscore/test/collections.js', - pluginPath + basePath + '/vendor/underscore/test/arrays.js', - pluginPath + basePath + '/vendor/underscore/test/functions.js', - pluginPath + basePath + '/vendor/underscore/test/objects.js', - pluginPath + basePath + '/vendor/underscore/test/utility.js', - pluginPath + basePath + '/vendor/underscore/test/chaining.js' + 'test/collections', + 'test/arrays', + 'test/functions', + 'test/objects', + 'test/utility', + 'test/chaining' ], function() { QUnit.start(); });