Skip to content

Migrate test runner from vitest to mocha (simplify tooling, enable 18.0.0 floor) - #290

Merged
UlisesGascon merged 3 commits into
5.0from
chore/simplify-tooling-mocha
Oct 22, 2026
Merged

UlisesGascon merged 3 commits into
5.0from
chore/simplify-tooling-mocha

Conversation

@UlisesGascon

Copy link
Copy Markdown
Member

Simplifies the test tooling and lets CI actually exercise the Node 18.0.0 floor.

  • Migrates the test runner from vitest to mocha 10. vite (vitest's engine) imports { constants } from node:fs/promises, which only exists from Node 18.4, so vitest could never load on the declared 18.0 floor. mocha 10 supports Node >= 14, so the suite now runs across the full 18.x range.
  • Drops vitest, @vitest/coverage-v8, the vite override, vitest.config.mjs, and the coveralls coverage integration. Adds mocha. Net devDependencies go from 7 to 6, and vite's large transitive tree is gone.
  • Converts the test files to mocha globals and node:assert (no test logic changed) and updates the eslint test globals.
  • Adds a 18.0.0 CI leg (every leg runs plain npm test); lint stays on Node >= 22.

Coverage is dropped: there is no zero-dependency coverage path for mocha, so keeping it would mean adding c8 or nyc. It can be reintroduced later (c8 on the latest Node leg only) if wanted.

Replace the vitest runner with mocha 10 so the suite runs across the full
Node 18 range, including the 18.0.0 floor that vite could not load. Convert
the test files to mocha globals and node:assert, drop coverage and the
coveralls integration, and remove the vitest/vite devDependencies.
@UlisesGascon UlisesGascon self-assigned this Oct 15, 2026
@UlisesGascon
UlisesGascon marked this pull request as ready for review October 15, 2026 11:04
@UlisesGascon
UlisesGascon requested a review from mfdebian October 16, 2026 17:13
@UlisesGascon
UlisesGascon merged commit 3aa78a2 into 5.0 Oct 22, 2026
36 checks passed
@UlisesGascon
UlisesGascon deleted the chore/simplify-tooling-mocha branch October 22, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants