Skip to content

Commit dbee9cf

Browse files
test(tui): require Redcode crash reports Refs #39
1 parent 8943de4 commit dbee9cf

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { expect, test } from "bun:test"
2+
import { buildIssueURL } from "../../src/component/error-component"
3+
4+
test("crash reports target Redcode", () => {
5+
const url = buildIssueURL("render failed", "stack trace")
6+
7+
expect(url.origin + url.pathname).toBe("https://github.com/reddb-io/redcode/issues/new")
8+
expect(url.searchParams.get("template")).toBe("bug-report.yml")
9+
expect(url.searchParams.get("description")).toContain("Redcode TUI crashed")
10+
expect(url.searchParams.get("reproduce")).toContain("Redcode crash screen")
11+
})

0 commit comments

Comments
 (0)