Skip to content

[Feature]: Promote testing to Stable — settle the Testing-Library-parity surface #147

Description

@JosunLP

Pre-flight checklist

  • I searched existing issues and did not find a duplicate request.
  • I explained the problem or use case, not just the desired API.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    testingChanges to the testing module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions