Skip to content

test: migrate integrate-ava from ava to vitest - #659

Merged
Boshen merged 2 commits into
mainfrom
test/migrate-integrate-ava-to-vitest
Jul 4, 2026
Merged

Boshen merged 2 commits into
mainfrom
test/migrate-integrate-ava-to-vitest

Conversation

@Boshen

@Boshen Boshen commented Jul 4, 2026

Copy link
Copy Markdown
Member

Migrates the integrate-ava package's test runner from ava to vitest.

What changed

  • Replace ava with vitest ("test": "vitest run") and drop the ava config block.
  • Add vitest.config.ts: include: __tests__/**/*.spec.ts, testTimeout: 60000 (matches ava's old 1m), and externalize the native (napi, CommonJS) @oxc-node/core binding so Node loads it directly instead of Vite transforming it.
  • Rewrite the four spec files to the vitest API (test / expect), dropping the ava ExecutionContext that was threaded through the cli.spec.ts stack-trace helper.
  • Remove the now-unused ava devDependency from the root workspace.

The subprocess specs still exercise oxc-node inside the spawned node --import @oxc-node/core/register / oxnode children, and the transform spec hits OxcTransformer in-process — so what's under test is unchanged; only the runner around it changed.

All 9 tests pass under vitest 4.1.9 (pnpm --filter=integrate-ava test), and oxlint / oxfmt --check are clean.

Note: the package directory/name is still integrate-ava (now a slight misnomer). Left as-is to keep this diff focused — happy to rename to integrate-vitest in a follow-up if preferred.

Replace the ava test runner with vitest in packages/integrate-ava: rewrite the four spec files to the vitest API, add vitest.config.ts (externalizing the native @oxc-node/core binding), and drop the now-unused root ava devDependency.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: db6f489ccc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/integrate-ava/vitest.config.ts Resolved
vitest 4 pulls in Vite 8 / rolldown, which ships no win32-ia32 native binding, so `vitest run` cannot start on 32-bit Windows. The i686 binding is still built and published; only the end-to-end integration tests are dropped for that target.
@Boshen
Boshen merged commit 3d694f9 into main Jul 4, 2026
51 of 52 checks passed
@Boshen
Boshen deleted the test/migrate-integrate-ava-to-vitest branch July 4, 2026 04:18
Boshen added a commit that referenced this pull request Jul 4, 2026
Follow-up to #659. That PR migrated the `integrate-ava` package from ava
to vitest, leaving the package name/directory a misnomer.

Rename `packages/integrate-ava` → `packages/integrate-vitest` so it's
named for what it integrates, consistent with the sibling
`integrate-module` / `integrate-module-bundler` packages.

- `git mv` of the directory (all files are pure renames; only the `name`
field in `package.json` changes).
- `pnpm-lock.yaml`: the importer key is renamed and moved to its sorted
position — no dependency changes (`pnpm install --frozen-lockfile`
passes).
- The root `--filter=integrate*` test glob still matches, and the specs'
relative paths (`../../cli/dist`, `../core`) are unchanged (same
directory depth).

`pnpm test` is green — `integrate-vitest` 9/9, plus `integrate-module`
21 and `integrate-module-bundler` 22.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant