Skip to content

chore(repo): test migration to vitest. phase 1#1975

Merged
shellscape merged 4 commits intomasterfrom
charlie/phase1-vitest-migration
Mar 6, 2026
Merged

chore(repo): test migration to vitest. phase 1#1975
shellscape merged 4 commits intomasterfrom
charlie/phase1-vitest-migration

Conversation

@charliecreates
Copy link
Contributor

@charliecreates charliecreates bot commented Mar 5, 2026

Summary

Migrates all Phase 1 packages in #1974 from Ava to Vitest:

  • packages/beep
  • packages/buble
  • packages/data-uri
  • packages/dsv
  • packages/eslint
  • packages/graphql
  • packages/image
  • packages/inject
  • packages/legacy
  • packages/multi-entry
  • packages/strip
  • packages/sucrase
  • packages/swc
  • packages/virtual
  • packages/yaml

Key updates:

  • Standardizes per-package scripts to:
    • test: vitest --config ../../.config/vitest.config.mts run
    • ci:test: pnpm test -- --reporter=verbose (plus existing test:ts where applicable)
  • Converts Ava APIs/assertions to Vitest equivalents in tests.
  • Updates shared Vitest config for Phase 1 migration needs (CJS/global test compatibility, test/test.* discovery, snapshot path parity in test/snapshots).
  • Migrates assertion fixtures relying on injected assertions (data-uri, dsv, legacy, sucrase, yaml).
  • Regenerates snapshot .snap files in Vitest format and removes Ava .md snapshot reports for migrated packages.

Validation

# package tests (snapshot update where needed)
for p in beep buble data-uri dsv eslint graphql image inject legacy multi-entry strip sucrase swc virtual yaml; do
  (cd packages/$p && pnpm test -- -u)
done

# type tests where present
for p in buble data-uri eslint graphql inject sucrase swc virtual; do
  (cd packages/$p && pnpm test:ts)
done

Notes

  • Adds an explicit timeout for packages/eslint/test/test.mjs (works with flat config) to avoid Vitest default-timeout flakiness.

Refs #1974

@shellscape
Copy link
Collaborator

@CharlieHelps please fix failing CI issues. Your task is complete when all checks are green.

@charliecreates
Copy link
Contributor Author

charliecreates bot commented Mar 5, 2026

Done — I fixed the CI failures on this PR, and all checks are now green (5/5) on 8e90d0a.

Pushed fixes:

@shellscape shellscape changed the title test: migrate phase 1 packages from ava to vitest chore(repo): test migration to vitest. phase 1 Mar 6, 2026
@shellscape shellscape merged commit 796cd55 into master Mar 6, 2026
10 checks passed
@shellscape shellscape deleted the charlie/phase1-vitest-migration branch March 6, 2026 00:46
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.

2 participants