FAILING_BOARD
tcmts.cli.test.e2e.traces.FAILING_BOARD · #qdz2c5ik · term · runs anywhere
export const FAILING_BOARD = `// tcm: namespace board
import { request } from "#codebase/lib/server";
export function parse(n: number): string {
throw new Error("no post " + n);
}
export async function fail(n: number): Promise<string> {
request();
return parse(n);
}
export function press(): void {
throw new Error("pressed " + Date.now());
}
export async function main() {
const call = document.createElement("button");
call.id = "call";
call.onclick = () => void fail(1).catch(() => (document.body.dataset.failed = "1"));
const boom = document.createElement("button");
boom.id = "boom";
boom.onclick = () => press();
document.body.append(call, boom);
}
`
used by