Fix test.js for browsers.

Former-commit-id: e334ab595fa78a59b8371b755ce8dc54706a6630
This commit is contained in:
John-David Dalton
2013-01-29 22:59:09 -08:00
parent 17dff36b65
commit 4907a7389f

View File

@@ -1,12 +1,6 @@
;(function(window, undefined) {
'use strict';
/** Detect free variable `global` and use it as `window` */
var freeGlobal = typeof global == 'object' && global;
if (freeGlobal.global === freeGlobal) {
window = freeGlobal;
}
/** Use a single load function */
var load = typeof require == 'function' ? require : window.load;
@@ -15,7 +9,7 @@
var min = 0;
var result = window.system
? (min = 1, system.args)
: (window.process ? (min = 2, process.argv) : window.arguments);
: (window.process ? (min = 2, process.argv) : (window.arguments || []));
result = result.length > min
? result[result.length - 1]
@@ -2709,4 +2703,4 @@
if (!window.document) {
QUnit.start();
}
}(this));
}(typeof global == 'object' && global || this));