import { Test , describe , given , it } from '@typed/test' ; import { Uuid } from '../types' ; import { UuidArray } from '../randomUuidSeed' ; import { uuid4 } from './uuid4' ; export const test = describe ( `uuid4` , [ given ( `[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]` , [ it ( `returns` , ( { equal } ) => { const expected = '1234-56-478-89a-bcdef10' as Uuid ; equal ( expected , uuid4 ( createUuidArray ( ) ) ) ; } ) , ] ) , ] ) ; function createUuidArray ( ) { return [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 ] as UuidArray ; }