mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 10:57:49 +00:00
Fix test fails related to root._.
This commit is contained in:
committed by
John-David Dalton
parent
7862ae6d36
commit
bd98779b3c
@@ -236,6 +236,9 @@
|
|||||||
(_.runInContext ? _.runInContext(root) : _)
|
(_.runInContext ? _.runInContext(root) : _)
|
||||||
));
|
));
|
||||||
|
|
||||||
|
/** Used to restore the `_` reference. */
|
||||||
|
var oldDash = root._;
|
||||||
|
|
||||||
/** List of latin-1 supplementary letters to basic latin letters. */
|
/** List of latin-1 supplementary letters to basic latin letters. */
|
||||||
var burredLetters = [
|
var burredLetters = [
|
||||||
'\xc0', '\xc1', '\xc2', '\xc3', '\xc4', '\xc5', '\xc6', '\xc7', '\xc8', '\xc9', '\xca', '\xcb', '\xcc', '\xcd', '\xce',
|
'\xc0', '\xc1', '\xc2', '\xc3', '\xc4', '\xc5', '\xc6', '\xc7', '\xc8', '\xc9', '\xca', '\xcb', '\xcc', '\xcd', '\xce',
|
||||||
@@ -457,6 +460,7 @@
|
|||||||
|
|
||||||
// Load lodash and expose it to the bad extensions/shims.
|
// Load lodash and expose it to the bad extensions/shims.
|
||||||
lodashBizarro = (lodashBizarro = require(filePath))._ || lodashBizarro['default'] || lodashBizarro;
|
lodashBizarro = (lodashBizarro = require(filePath))._ || lodashBizarro['default'] || lodashBizarro;
|
||||||
|
root._ = oldDash;
|
||||||
|
|
||||||
// Restore built-in methods.
|
// Restore built-in methods.
|
||||||
setProperty(Array, 'isArray', _isArray);
|
setProperty(Array, 'isArray', _isArray);
|
||||||
@@ -11545,7 +11549,6 @@
|
|||||||
(function() {
|
(function() {
|
||||||
test('should return the `lodash` function', 2, function() {
|
test('should return the `lodash` function', 2, function() {
|
||||||
if (!isModularize) {
|
if (!isModularize) {
|
||||||
var oldDash = root._;
|
|
||||||
strictEqual(_.noConflict(), oldDash);
|
strictEqual(_.noConflict(), oldDash);
|
||||||
|
|
||||||
if (!(isRhino && typeof require == 'function')) {
|
if (!(isRhino && typeof require == 'function')) {
|
||||||
@@ -18141,8 +18144,7 @@
|
|||||||
var acceptFalsey = _.difference(allMethods, rejectFalsey);
|
var acceptFalsey = _.difference(allMethods, rejectFalsey);
|
||||||
|
|
||||||
test('should accept falsey arguments', 229, function() {
|
test('should accept falsey arguments', 229, function() {
|
||||||
var emptyArrays = _.map(falsey, _.constant([])),
|
var emptyArrays = _.map(falsey, _.constant([]));
|
||||||
oldDash = root._;
|
|
||||||
|
|
||||||
_.each(acceptFalsey, function(methodName) {
|
_.each(acceptFalsey, function(methodName) {
|
||||||
var expected = emptyArrays,
|
var expected = emptyArrays,
|
||||||
|
|||||||
Reference in New Issue
Block a user