Skip to content

Switch from Jest to Vitest#297

Merged
tyrasd merged 4 commits into
ideditor:mainfrom
FloEdelmann:vitest
May 19, 2026
Merged

Switch from Jest to Vitest#297
tyrasd merged 4 commits into
ideditor:mainfrom
FloEdelmann:vitest

Conversation

@FloEdelmann
Copy link
Copy Markdown
Contributor

@FloEdelmann FloEdelmann commented May 7, 2026

To align with iD, see openstreetmap/iD#10452.

As a side-effect, the total number of dependencies goes down from 412 to 245 (-41%) and with that a vulnerability in the no longer needed transitive brace-expansion dependency is resolved.

For the coverage provider, we have two choices:

  1. Istanbul (currently installed)
    Keeps the reported coverage exactly the same as with Jest (as that also used Istanbul), but increases the test duration from ~0.43s to ~0.89s on my machine.
  2. v8
    Reports slightly larger coverage in build.js than Jest/Istanbul (74.12% vs. 73.77% statements, 64.10% vs. 63.78% branches), exactly the same coverage in the other files, but keeps test duration at ~0.49s on my machine.

I'm happy to switch to v8 if preferred.

@tyrasd
Copy link
Copy Markdown
Collaborator

tyrasd commented May 12, 2026

I would say v8 is better suited for the use case of the schema-builder test suite. Can you please switch to it?

@tyrasd tyrasd merged commit feae246 into ideditor:main May 19, 2026
2 checks passed
@tyrasd tyrasd added the dependencies Pull requests that update a dependency file label May 19, 2026
@FloEdelmann FloEdelmann deleted the vitest branch May 19, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants