Skip to content

Map: replace Jest and Babel with Vitest and convert the tests to TypeScript #285

Closed
9 of 9 issues completed

Description

@jtklein-agents

Destination

A spec issue, with child implementation tickets on a spec/<n>-… branch, for replacing Jest and Babel with Vitest and converting the tests to TypeScript. The map settles decisions; the spec and its tickets do the swap.

Done for the spec means:

  • Every file Jest runs today (62 under src/, 4 e2e/helpers/*.test.js) and the jest/ support files are TypeScript and run under Vitest, with the same tests passing as under Jest.
  • package.json has no jest, babel-jest or direct @babel/* entry (including the resolutions pin), and the jest/ Babel transform is gone.
  • Converted tests meet the bar of other .ts under src: zero diagnostics under --noImplicitAny, nothing added to scripts/typecheck-baseline.txt.
  • CI's yarn react-test runs Vitest.

Notes

  • Domain: the test toolchain of an electron-vite app (Vite 8, electron-vite 6, Node 22, Yarn 1). Babel exists only for Jest (jest/babelTransform.js).
  • Read docs/agents/checks.md (Jest setup, test seams, typecheck baseline) and docs/agents/typescript-leaves.md before a ticket that touches them.
  • Skills: grilling and domain-modeling for grilling tickets; research for research tickets.
  • Dependencies: add only vitest and what it strictly requires (for example jsdom as a direct dependency). Any other new package needs its own decision.
  • The spike task runs on a throwaway branch that is never merged.

Decisions so far

Not yet specified

Nothing. Every decision ticket is closed and the route is clear. The next step is writing the spec from the decisions above.

Out of scope

  • Replacing eslint-config-react-app and the Babel it pulls in transitively: a separate lint effort. Vitest lint rules go with it.
  • Converting the Playwright specs, Playwright configs and non-test e2e helpers: a different runner.

Sub-issues

Sub-issues

9 of 9 Issues completed
Loading 9 sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    wayfinder:map

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions