import { configure, getConsoleSink } from "@logtape/logtape" import { doQueryPlayer } from "../src/graphql/stratz.ts" import { assert, assertEquals} from "@std/assert" await configure({ sinks: { console: getConsoleSink() }, filters: {}, loggers: [ { category: ["logtape", "meta"], sinks: ["console"], level: "warning" }, { category: ["fedify"], sinks: ["console"], level: "info" }, { category: ["dotino-veloce"], sinks: ["console"], level: "debug" }, ], }) Deno.test(async function querySteffo() { const user = await doQueryPlayer(74048532) assert(user) assertEquals(user.id, 74048532) }) Deno.test(async function queryOne() { const user = await doQueryPlayer(1) assertEquals(user, null) }) Deno.test(async function queryMinusOne() { const user = await doQueryPlayer(-1) assertEquals(user, null) })