mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 11:27:50 +00:00
Upgrade to qunit-extras 2.0.
This commit is contained in:
@@ -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",
|
||||||
|
|||||||
@@ -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');
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|||||||
11
test/test.js
11
test/test.js
@@ -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),
|
||||||
|
|||||||
Reference in New Issue
Block a user