lowcode-engine/packages/utils/test/src/unique-id.test.ts
2023-11-13 13:00:38 +08:00

12 lines
319 B
TypeScript

import { uniqueId } from '../../src/unique-id';
test('uniqueId should return a unique id with prefix', () => {
const id = uniqueId('test');
expect(id.startsWith('test')).toBeTruthy();
});
test('uniqueId should return a unique id without prefix', () => {
const id = uniqueId();
expect(id).not.toBeFalsy();
});