Fix _.uniqueId test to properly compare values.

This commit is contained in:
jdalton
2015-04-18 09:31:30 -07:00
parent 75ce6b82e8
commit 20ba0bd1dc

View File

@@ -13500,14 +13500,16 @@
test('should use a zeroed `_.uniqueId` counter', 3, function() { test('should use a zeroed `_.uniqueId` counter', 3, function() {
if (!isModularize) { if (!isModularize) {
var oldId = (_.uniqueId(), _.uniqueId()), _.times(2, _.uniqueId);
var oldId = Number(_.uniqueId()),
lodash = _.runInContext(); lodash = _.runInContext();
ok(_.uniqueId() > oldId, '_.uniqueId() > oldId'); ok(_.uniqueId() > oldId);
var id = lodash.uniqueId(); var id = lodash.uniqueId();
strictEqual(id, '1'); strictEqual(id, '1');
ok(id < oldId, 'id < oldId'); ok(id < oldId);
} }
else { else {
skipTest(3); skipTest(3);