mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Fix _.uniqueId test to properly compare values.
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user