mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +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() {
|
||||
if (!isModularize) {
|
||||
var oldId = (_.uniqueId(), _.uniqueId()),
|
||||
_.times(2, _.uniqueId);
|
||||
|
||||
var oldId = Number(_.uniqueId()),
|
||||
lodash = _.runInContext();
|
||||
|
||||
ok(_.uniqueId() > oldId, '_.uniqueId() > oldId');
|
||||
ok(_.uniqueId() > oldId);
|
||||
|
||||
var id = lodash.uniqueId();
|
||||
strictEqual(id, '1');
|
||||
ok(id < oldId, 'id < oldId');
|
||||
ok(id < oldId);
|
||||
}
|
||||
else {
|
||||
skipTest(3);
|
||||
|
||||
Reference in New Issue
Block a user