compare
Mocha vs Vitest
The same facts for both, read from GitHub every night, and the relation a person reviewed.
| Fact | Mocha | Vitest |
|---|---|---|
| Language | JavaScript | TypeScript |
| Licence | MIT | MIT |
| Stars | 23k | 17k |
| Latest | v12.0.3 | v5.1.1 |
| Last push | 2026-11-23 | 2026-11-23 |
| Release cadence | about 11 days between releases | about 15 days between releases |
| Active contributors | 17 commit authors on the default branch in the last 90 days | 59 commit authors on the default branch in the last 90 days |
| Flags | none | none |
How they relate
Vitest replaces Mocha. Alternatives to Mocha →
Full replacementRuns describe and it style tests with assertions and mocks built in.
Mocha
- v12.0.32026-10-01keep watching when the last test file is removed (#6355) (921c161)
- v12.0.22026-09-17fail nested tests on beforeEach failure (#6292) (a75b43b)
- v12.0.12026-09-11bump serialize-javascript to ^7.1.1 (#6278) (02558a3)
- v12.0.02026-08-31fixup parsing negative numbers and quoted strings (#6250) (2962875)
- v12.0.0-rc.62026-08-09deps: update dependency starlight-blog to ^0.28.0 (#6153) (6b79044)pre-release
Vitest
- v5.1.12026-11-17cache: Add fs module cache env variables - by @sheremet-va in <samp>(708c0)</samp>
- v5.1.02026-11-02Add --last-failed to run only failed tests - by @sheremet-va in <samp>(82f63)</samp>
- v5.1.0-beta.12026-10-19Add --last-failed to run only failed tests - by @sheremet-va in <samp>(82f63)</samp>pre-release
- v4.1.122026-10-15mocker: Harden manual and redirect mocks [backport to v4] - by @sheremet-va in <samp>(b8253)</samp>
- v5.0.52026-10-15Keep vite default fs.deny with api token file - by @hi-ogawa, Hiroshi Ogawa and Claude Opus 5.5 in <samp>(2…
Mocha
✓ signed The latest release, v12.0.3, carries a signature GitHub verified.
Loading the security report
Vitest
✓ signed The latest release, v5.1.1, carries a signature GitHub verified.
Loading the security report