packages/ui: plain vitest skips the Playwright files #334

Closed
kayg wants to merge 1 commit from issue/325-vitest-exclude-e2e into dev
Owner

Part of #325.

vitest run from packages/ui (an editor, bunx vitest) had no config there, so its default include matched the Playwright files in src/primitives/e2e/*.spec.ts and reported them as FAIL, and inbar.test.ts failed too because the Svelte plugin was missing for its .svelte.ts module. CI was unaffected: it runs test:primitives with the primitives config.

Fix. packages/ui/vitest.config.ts reuses the primitives config, includes src/**/*.test.ts, and excludes **/e2e/**.

Evidence. bunx vitest run in packages/ui: before, 5 failed | 4 passed files (check, selector, switch, toast specs and inbar); after, 5 passed (5), 27 tests. bun run test:primitives unchanged.

🤖 Generated with Claude Code

Part of #325. `vitest` run from `packages/ui` (an editor, `bunx vitest`) had no config there, so its default include matched the Playwright files in `src/primitives/e2e/*.spec.ts` and reported them as FAIL, and `inbar.test.ts` failed too because the Svelte plugin was missing for its `.svelte.ts` module. CI was unaffected: it runs `test:primitives` with the primitives config. **Fix.** `packages/ui/vitest.config.ts` reuses the primitives config, includes `src/**/*.test.ts`, and excludes `**/e2e/**`. **Evidence.** `bunx vitest run` in `packages/ui`: before, `5 failed | 4 passed` files (check, selector, switch, toast specs and inbar); after, `5 passed (5)`, 27 tests. `bun run test:primitives` unchanged. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
packages/ui: plain vitest skips the Playwright files and compiles runes
Some checks failed
CI / server (pull_request) Successful in 23s
CI / web (pull_request) Failing after 25s
CI / rust (pull_request) Successful in 1m27s
1b7e3189f5
Without a config in packages/ui, vitest's default include matched src/primitives/e2e/*.spec.ts
(Playwright files) and reported them FAIL, and inbar.test.ts failed too (no svelte plugin for its
.svelte.ts module). The config reuses the primitives one and excludes e2e.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
kayg closed this pull request 2026-10-14 20:53:51 +00:00
Some checks failed
CI / server (pull_request) Successful in 23s
CI / web (pull_request) Failing after 25s
CI / rust (pull_request) Successful in 1m27s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!334
No description provided.