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