Pre-flight checklist
Problem or use case
testing is Beta and its surface is one minor old: screen/within, userEvent, the fireEvent.* family, module mocks, and a11y helpers all landed in 1.14.0. It mirrors Testing Library APIs well (including Shadow-DOM-aware queries, which suit bQuery's Web Component model), but a test-utility API that just appeared cannot yet be relied on for teams' test suites, and the official runner integration story (beyond bun:test) is undocumented.
Proposed solution
Freeze the testing API for one cycle, document runner integration beyond bun:test (at minimum guidance for Vitest/Jest-style runners, since not every team uses Bun), and add coverage proving the query/userEvent/fireEvent/mock APIs behave consistently — especially the Shadow-DOM-aware queries against real components. Exit criteria: frozen surface, documented runner integrations, tested query/interaction APIs across light and shadow DOM.
Possible API or UX shape
import { render, screen, userEvent } from "@bquery/bquery/testing";
render(MyComponent, { props });
await userEvent.click(screen.getByRole("button", { name: "Save" }));
// Shadow-DOM-aware queries documented + tested; runner-agnostic guidance published
Alternatives considered
Promoting now — premature for a 1.14-introduced surface. Supporting only bun:test officially — limits adoption to Bun users; documenting runner-agnostic usage costs little and broadens reach.
Relevant area
testing
Additional context
Reuse the a11y audit API (#142) in the testing a11y helpers so assertions and runtime audits share one definition of "accessible." Parity target: React Testing Library, Vue Test Utils, Svelte Testing Library.
Pre-flight checklist
Problem or use case
testingis Beta and its surface is one minor old:screen/within,userEvent, thefireEvent.*family, module mocks, and a11y helpers all landed in 1.14.0. It mirrors Testing Library APIs well (including Shadow-DOM-aware queries, which suit bQuery's Web Component model), but a test-utility API that just appeared cannot yet be relied on for teams' test suites, and the official runner integration story (beyondbun:test) is undocumented.Proposed solution
Freeze the
testingAPI for one cycle, document runner integration beyondbun:test(at minimum guidance for Vitest/Jest-style runners, since not every team uses Bun), and add coverage proving the query/userEvent/fireEvent/mock APIs behave consistently — especially the Shadow-DOM-aware queries against real components. Exit criteria: frozen surface, documented runner integrations, tested query/interaction APIs across light and shadow DOM.Possible API or UX shape
Alternatives considered
Promoting now — premature for a 1.14-introduced surface. Supporting only
bun:testofficially — limits adoption to Bun users; documenting runner-agnostic usage costs little and broadens reach.Relevant area
testingAdditional context
Reuse the
a11yaudit API (#142) in the testing a11y helpers so assertions and runtime audits share one definition of "accessible." Parity target: React Testing Library, Vue Test Utils, Svelte Testing Library.