WIP test client

This commit is contained in:
Andras Schmelczer 2025-02-22 12:56:23 +00:00
parent fde1fecbb6
commit 4872f6d3b3
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
7 changed files with 287 additions and 2 deletions

View file

@ -0,0 +1,5 @@
export function assert(value: boolean, message: string): asserts value {
if (!value) {
throw new Error(message);
}
}

View file

@ -0,0 +1,3 @@
export function choose<T>(values: T[]): T {
return values[Math.floor(Math.random() * values.length)];
}

View file

@ -0,0 +1,3 @@
export function sleep(ms: number): Promise<void> {
return new Promise((resolve) => setTimeout(resolve, ms));
}