Upgrade to qunit-extras 2.0.

This commit is contained in:
John-David Dalton
2016-04-30 11:59:06 -07:00
parent 7ee4bf8d02
commit 963e2c23b0
3 changed files with 12 additions and 32 deletions

View File

@@ -43,7 +43,7 @@
"lodash": "4.10.0", "lodash": "4.10.0",
"markdown-doctest": "^0.3.4", "markdown-doctest": "^0.3.4",
"platform": "^1.3.1", "platform": "^1.3.1",
"qunit-extras": "^1.5.0", "qunit-extras": "^2.0.0",
"qunitjs": "~1.23.1", "qunitjs": "~1.23.1",
"request": "^2.69.0", "request": "^2.69.0",
"requirejs": "^2.2.0", "requirejs": "^2.2.0",

View File

@@ -14,10 +14,8 @@
/** Method and object shortcuts. */ /** Method and object shortcuts. */
var phantom = root.phantom, var phantom = root.phantom,
amd = root.define && define.amd,
argv = root.process && process.argv, argv = root.process && process.argv,
document = !phantom && root.document, document = !phantom && root.document,
noop = function() {},
slice = arrayProto.slice, slice = arrayProto.slice,
WeakMap = root.WeakMap; WeakMap = root.WeakMap;
@@ -26,30 +24,17 @@
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
/** Use a single "load" function. */ /** Load QUnit and extras. */
var load = (!amd && typeof require == 'function') var QUnit = root.QUnit || require('qunit-extras');
? require
: noop;
/** The unit testing framework. */ /** Load stable Lodash. */
var QUnit = root.QUnit || (root.QUnit = ( var _ = root._ || (
QUnit = load('../node_modules/qunitjs/qunit/qunit.js') || root.QUnit, _ = require('../lodash.js'),
QUnit = QUnit.QUnit || QUnit
));
/** Load stable Lodash and QUnit Extras. */
var _ = root._ || (root._ = (
_ = load('../lodash.js'),
_.runInContext(root) _.runInContext(root)
)); );
var QUnitExtras = load('../node_modules/qunit-extras/qunit-extras.js');
if (QUnitExtras) {
QUnitExtras.runInContext(root);
}
var convert = (function() { var convert = (function() {
var baseConvert = root.fp || load('../fp/_baseConvert.js'); var baseConvert = root.fp || require('../fp/_baseConvert.js');
if (!root.fp) { if (!root.fp) {
return function(name, func, options) { return function(name, func, options) {
return baseConvert(_, name, func, options); return baseConvert(_, name, func, options);
@@ -79,7 +64,7 @@
? (fp = _.noConflict(), _ = root._, fp) ? (fp = _.noConflict(), _ = root._, fp)
: convert(_.runInContext()); : convert(_.runInContext());
var mapping = root.mapping || load('../fp/_mapping.js'); var mapping = root.mapping || require('../fp/_mapping.js');
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/

View File

@@ -300,10 +300,10 @@
? require ? require
: noop; : noop;
/** The unit testing framework. */ /** Load QUnit and extras. */
var QUnit = root.QUnit || (root.QUnit = load('../node_modules/qunitjs/qunit/qunit.js')); var QUnit = root.QUnit || load('qunit-extras');
/** Load stable Lodash and QUnit Extras. */ /** Load stable Lodash. */
var lodashStable = root.lodashStable; var lodashStable = root.lodashStable;
if (!lodashStable) { if (!lodashStable) {
try { try {
@@ -316,11 +316,6 @@
} }
lodashStable = lodashStable.runInContext(root); lodashStable = lodashStable.runInContext(root);
var QUnitExtras = load('../node_modules/qunit-extras/qunit-extras.js');
if (QUnitExtras) {
QUnitExtras.runInContext(root);
}
/** The `lodash` function to test. */ /** The `lodash` function to test. */
var _ = root._ || (root._ = ( var _ = root._ || (root._ = (
_ = load(filePath), _ = load(filePath),