Files
Bubberstation/tgui/packages/common/uuid.test.ts
SkyratBot c98d76bca5 [MIRROR] Tgui: More common components in ts (#27674)
* Tgui: More common components in ts (#83098)

## About The Pull Request
Converts more of common into typescript, with some tests
## Why It's Good For The Game
Typescript,,,,

* Tgui: More common components in ts

---------

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
2024-05-15 00:57:58 +02:00

12 lines
301 B
TypeScript

import { createUuid } from './uuid';
describe('createUuid', () => {
it('generates a UUID v4 string', () => {
const uuid = createUuid();
expect(uuid).toHaveLength(36);
expect(uuid).toMatch(
/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,
);
});
});