Avoid chance fails by noConflict race conditions.

This commit is contained in:
John-David Dalton
2013-12-16 02:36:07 -08:00
parent 676e1705c1
commit 98566150d2
2 changed files with 5 additions and 9 deletions

View File

@@ -8704,7 +8704,7 @@
test('should accept falsey arguments', 157, function() {
var emptyArrays = _.map(falsey, function() { return []; }),
isExported = '_' in root,
isExposed = '_' in root,
oldDash = root._;
_.forEach(acceptFalsey, function(methodName) {
@@ -8721,7 +8721,7 @@
});
if (methodName == 'noConflict') {
if (isExported) {
if (isExposed) {
root._ = oldDash;
} else {
delete root._;