Ajust tests for npm build modifications.

This commit is contained in:
John-David Dalton
2014-12-21 18:10:06 -06:00
parent 0b1e2a6107
commit 9b48bd27dd

View File

@@ -788,24 +788,34 @@
expected = _.map(values, _.constant(true)); expected = _.map(values, _.constant(true));
test('creates a new instance when called without the `new` operator', 1, function() { test('creates a new instance when called without the `new` operator', 1, function() {
if (!isNpm) {
var actual = _.map(values, function(value) { var actual = _.map(values, function(value) {
return _(value) instanceof _; return _(value) instanceof _;
}); });
deepEqual(actual, expected); deepEqual(actual, expected);
}
else {
skipTest();
}
}); });
test('should return provided `lodash` instances', 1, function() { test('should return provided `lodash` instances', 1, function() {
if (!isNpm) {
var actual = _.map(values, function(value) { var actual = _.map(values, function(value) {
var wrapped = _(value); var wrapped = _(value);
return _(wrapped) === wrapped; return _(wrapped) === wrapped;
}); });
deepEqual(actual, expected); deepEqual(actual, expected);
}
else {
skipTest();
}
}); });
test('should convert foreign wrapped values to `lodash` instances', 1, function() { test('should convert foreign wrapped values to `lodash` instances', 1, function() {
if (lodashBizarro) { if (!isNpm && lodashBizarro) {
var actual = _.map(values, function(value) { var actual = _.map(values, function(value) {
var wrapped = _(lodashBizarro(value)), var wrapped = _(lodashBizarro(value)),
unwrapped = getUnwrappedValue(wrapped); unwrapped = getUnwrappedValue(wrapped);
@@ -8651,6 +8661,7 @@
source = { 'a': function(array) { return array[0]; }, 'b': 'B' }; source = { 'a': function(array) { return array[0]; }, 'b': 'B' };
test('should mixin `source` methods into lodash', 4, function() { test('should mixin `source` methods into lodash', 4, function() {
if (!isNpm) {
_.mixin(source); _.mixin(source);
strictEqual(_.a(value), 'a'); strictEqual(_.a(value), 'a');
@@ -8664,6 +8675,10 @@
delete _.b; delete _.b;
delete _.prototype.b; delete _.prototype.b;
}
else {
skipTest(4);
}
}); });
test('should use `this` as the default `object` value', 3, function() { test('should use `this` as the default `object` value', 3, function() {