mirror of
https://git.sfja.dk/Mikkel/slige.git
synced 2025-01-18 18:16:31 +00:00
14 lines
408 B
TypeScript
14 lines
408 B
TypeScript
|
import { assertEquals } from "jsr:@std/assert";
|
||
|
import { playerFromUnknown } from "./program_1.ts";
|
||
|
|
||
|
Deno.test("must work", () => {
|
||
|
assertEquals(
|
||
|
playerFromUnknown("miklz-33"),
|
||
|
{ ok: true, value: { username: "miklz", level: 33 } },
|
||
|
);
|
||
|
assertEquals(
|
||
|
playerFromUnknown({ username: "piet", level: 2 }),
|
||
|
{ ok: true, value: { username: "piet", level: 2 } },
|
||
|
);
|
||
|
});
|