We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent be21b74 commit 91c2fa4Copy full SHA for 91c2fa4
1 file changed
test/common/commontypes/UtilSpec.js
@@ -388,14 +388,16 @@ describe('Util', () => {
388
389
it('createUniqueID', () => {
390
let id = Util.createUniqueID();
391
- expect(id).toBe('id_0');
392
- expect(Util.lastSeqID).toBe(0);
+ let lastSeqId = Util.lastSeqID;
+ expect(id).toContain('id_');
393
+ expect(id).toBe(`id_${lastSeqId}`);
394
id = Util.createUniqueID('custom_');
- expect(id).toBe('custom_1');
395
- expect(Util.lastSeqID).toBe(1);
+ expect(id).toContain('custom_');
396
+ expect(id).toBe(`custom_${lastSeqId + 1}`);
397
id = Util.createUniqueID();
- expect(id).toBe('id_2');
398
- expect(Util.lastSeqID).toBe(2);
399
+ expect(id).toBe(`id_${lastSeqId + 2}`);
400
+ expect(lastSeqId + 2).toBe(Util.lastSeqID);
401
})
402
403
});
0 commit comments