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 } },
|
|
);
|
|
});
|