Update vendor/qunit-extras and simplify its load/install.

This commit is contained in:
John-David Dalton
2014-01-24 09:23:26 -08:00
parent 44fa3d2d07
commit 087ed0aa6a
2 changed files with 28 additions and 19 deletions

View File

@@ -83,7 +83,7 @@
/** Use a single "load" function */
var load = (typeof require == 'function' && !amd)
? require
: (isJava && root.load);
: (isJava && root.load) || noop;
/** The unit testing framework */
var QUnit = (function() {
@@ -91,12 +91,17 @@
root.addEventListener || (root.addEventListener = noop),
root.setTimeout || (root.setTimeout = noop),
root.QUnit = load('../vendor/qunit/qunit/qunit.js') || root.QUnit,
(load('../vendor/qunit-extras/qunit-extras.js') || { 'runInContext': noop }).runInContext(root),
addEventListener === noop && delete root.addEventListener,
root.QUnit
);
}());
/** Load and install QUnit Extras */
var qa = load('../vendor/qunit-extras/qunit-extras.js');
if (qa) {
qa.runInContext(root);
}
/*--------------------------------------------------------------------------*/
// log params provided to `test.js`