3.0 KiB
OpenSpec Change: testing-dom-spec-conformance
- Change ID: testing-dom-spec-conformance
- Package:
@suaveplan/testing-dom - Status: PROPOSED
- Date: 2026-04-26
Summary
Add **Verified by:** lines to every requirement in openspec/specs/testing-dom/spec.md, add a small spec-conformance test that pins the dual-runner conditional-exports shape declared in package.json, and rectify the historical "retro-tick" phrasing in the archived enterprise-testing-dom tasks so bun scripts/openspec-conformance.ts @suaveplan/testing-dom exits 0. No public-API changes.
Current state
@suaveplan/testing-dom is structurally solid: dual-runner re-exports (vitest + bun:test), createTestConfig() factory with WSL2-safe defaults and dynamic @vitejs/plugin-react loading, side-effect-only polyfills, jest-dom matcher extension, renderComponent wrapper with auto-cleanup and userEvent, accessibility-first query aliases, structured TestingDomError hierarchy with stable codes, dep-graph + tree-shake + no-disallowed guards, and instrumented() OTel wrapper. All 63 tests pass under vitest. The conformance gaps are documentary plus one unwritten test scenario:
- 9/9 requirements lack
**Verified by:**lines. - "Dual-runner conditional exports preserved" — the spec asserts
package.json#exportsroutes thevitest+defaultconditions to one barrel and thebuncondition to the bun-test barrel, but no test pins the JSON shape, so a regression in the exports map would slip past the test suite. tasks.mdof2026-04-19-enterprise-testing-dom/carries the legacy retro-tick phrasing the conformance script flags.- The Coverage section path-references
packages/universal/testing-dom/src/; the package now lives atpackages/dev/testing-dom/src/after the domain-first reorg. (Documentary fix only — coverage gate already runs against the correct path.)
What changes
- Add
**Verified by:**line under every### Requirement:block inopenspec/specs/testing-dom/spec.md. - Update the path reference inside the "Coverage and docs gates" requirement from
packages/universal/testing-dom/src/topackages/dev/testing-dom/src/. - Add
tests/exports-map.spec-conformance.test.tsthat parsespackage.jsonand pins:exports["."]["vitest"].default === "./dist/index.js"exports["."]["default"].default === "./dist/index.js"exports["."]["bun"].default === "./dist/runner/bun-test.js"./polyfills,./matchers,./config,./errors,./render,./queries,./usersubpaths exist.
- Replace the legacy retro-tick phrase in
openspec/archive/2026-04-19-enterprise-testing-dom/tasks.mdwith a neutral note pointing at this change. - Re-run
bun scripts/openspec-conformance.ts @suaveplan/testing-domand confirm exit 0.
Impact
- Public API unchanged.
- One new test file (~40 lines).
openspec/specs/testing-dom/spec.mdgains 9**Verified by:**lines and one corrected path reference.openspec/archive/2026-04-19-enterprise-testing-dom/tasks.mdrephrased to drop the conformance-blocking phrase.