Page MenuHomePhabricator

Migrate Codex test suite from Jest to Vitest
Closed, DuplicatePublic

Description

Vite's CJS Node API is deprecated as of v5 (the current major version). Many other projects in the Vite ecosystem will likely make similar moves.

Codex should embrace this ESM-based future by migrating its test suite from Jest (which still only has experimental support for ES Modules) in favor of Vitest, a test-runner specifically built for Vite.

When we first started working on Codex, Vitest seemed a little too new to adopt. But the project seems to have matured and gained significant adoption. Vitest looks like it mostly shares Jest's testing API, so hopefully this migration is not too involved.

More info: https://vitest.dev/guide/migration.html#migrating-from-jest

Related Objects