Avoid sparatic fails with Firefox 26 and amd tests.

This commit is contained in:
John-David Dalton
2013-12-16 01:05:39 -08:00
parent b5dc89f0e6
commit 6845a52e92

View File

@@ -162,14 +162,16 @@
basePath = ('//' + location.host + location.pathname.replace(reBasename, '')).replace(/\btest\/$/, ''), basePath = ('//' + location.host + location.pathname.replace(reBasename, '')).replace(/\btest\/$/, ''),
modulePath = ui.buildPath.replace(/\.js$/, ''), modulePath = ui.buildPath.replace(/\.js$/, ''),
locationPath = modulePath.replace(reBasename, ''), locationPath = modulePath.replace(reBasename, ''),
moduleMain = modulePath.match(reBasename)[0]; moduleMain = modulePath.match(reBasename)[0],
uid = +new Date;
QUnit.config.autostart = false; QUnit.config.autostart = false;
function getConfig() { function getConfig() {
return { return {
'baseUrl': './', 'baseUrl': './',
'urlArgs': 't=' + (+new Date), 'urlArgs': 't=' + uid++,
'waitSeconds': 0,
'packages': [ 'packages': [
{ {
'name': 'lodash', 'name': 'lodash',
@@ -230,7 +232,7 @@
if (window.requirejs) { if (window.requirejs) {
addBizarroMethods(); addBizarroMethods();
require(getConfig(), ['lodash'], function(lodash) { require(getConfig(), ['lodash'], function(lodash) {
lodashBizarro = lodash; lodashBizarro = lodash.noConflict();
delete requirejs.s.contexts._; delete requirejs.s.contexts._;
removeBizarroMethods(); removeBizarroMethods();