# Jest vs Vitest: source lines of code compared

The Jest vs Vitest comparison on OctoCounts shows side-by-side source line counts for jestjs/jest and vitest-dev/vitest, counted with the same engine and analysis options on the dates shown in the methodology line: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.

As of 2026-09-16, jestjs/jest contains 152,825 total lines (72,240 code) across 1,689 files, while vitest-dev/vitest contains 120,001 total lines (93,179 code) across 748 files as of 2026-09-16. vitest-dev/vitest is about 1.3x the size of jestjs/jest by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.

| Metric | [jestjs/jest](https://octocounts.com/github/jestjs/jest) | [vitest-dev/vitest](https://octocounts.com/github/vitest-dev/vitest) |
| --- | ---: | ---: |
| Files | 1,689 | 748 |
| Total lines | 152,825 | 120,001 |
| Code lines | 72,240 | 93,179 |
| Comment lines | 52,574 | 14,703 |
| Blank lines | 28,011 | 12,119 |
| Languages counted | 12 | 11 |

Top languages in jestjs/jest: TypeScript (78.0% of code), JavaScript (11.2% of code), JSON (9.2% of code). Top languages in vitest-dev/vitest: TypeScript (75.3% of code), YAML (19.9% of code), JSON (1.9% of code). TypeScript, JavaScript, JSON appear in both top language lists; CSS, SVG appear only in jestjs/jest's top languages; YAML, Vue appear only in vitest-dev/vitest's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. jestjs/jest was counted at ref 121c2ae6d5796917d90024514c9f7ddb5a76df83 (commit 121c2ae6d579) on 2026-09-16; vitest-dev/vitest was counted at ref 0780a8e5b7967a4168173599e9c74fb79aab2483 (commit 0780a8e5b796) on 2026-09-16. See the [counting methodology](https://octocounts.com/docs/methodology) for ignored directories and analysis options.
## About this comparison

jestjs/jest counts the Jest monorepo: the test runner, expect matchers, mocking and snapshot machinery, reporters, and the family of packages around them. vitest-dev/vitest counts the Vitest repository: the runner and its core integrations, written in TypeScript. Both counts measure test-runner source trees, counted on the dates in the methodology line; the broader ecosystems and environment adapters for both tools live partly elsewhere.

Both codebases are TypeScript-dominant in the per-language tables, so the comparison is less about implementation language than about scope: Jest's repository contains the runner plus many first-party packages in one tree, while Vitest's repository concentrates on the core and builds on Vite, which is counted on its own page on this site.

A sizeable share of both trees is tests and fixtures — unsurprising for testing tools, whose own suites double as regression material — so neither total is purely the code that executes your tests.

_These counts do not predict test execution speed, memory use, or which runner fits a project; those depend on the runner version, the transform and environment setup, and the test suite itself. Read the numbers as the maintenance surface of each tool._

Sources: [jestjs/jest repository (packages monorepo)](https://github.com/jestjs/jest) · [vitest-dev/vitest repository](https://github.com/vitest-dev/vitest). Statements verified 2026-09-16.

Evidence and next steps:

- [jestjs/jest SLOC report](https://octocounts.com/github/jestjs/jest)
- [vitest-dev/vitest SLOC report](https://octocounts.com/github/vitest-dev/vitest)
- [Compare jestjs/jest and vitest-dev/vitest interactively](https://octocounts.com/compare?left=https%3A%2F%2Fgithub.com%2Fjestjs%2Fjest&right=https%3A%2F%2Fgithub.com%2Fvitest-dev%2Fvitest)

Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.

## Compare FAQ

### Which has more lines of code, jestjs/jest or vitest-dev/vitest?

vitest-dev/vitest has more code: 93,179 code lines versus 72,240 for jestjs/jest, about 1.3x as much, based on cached OctoCounts reports as of 2026-09-16.

### Does more source lines of code mean more complexity?

Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for jestjs/jest, vitest-dev/vitest, or any repository.

### How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. jestjs/jest was counted at ref 121c2ae6d5796917d90024514c9f7ddb5a76df83 (commit 121c2ae6d579) on 2026-09-16; vitest-dev/vitest was counted at ref 0780a8e5b7967a4168173599e9c74fb79aab2483 (commit 0780a8e5b796) on 2026-09-16. See the counting methodology for ignored directories and analysis options.

### Can I compare a different branch, tag, or commit?

Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.

## Related OctoCounts pages

- [Interactive repository comparison](https://octocounts.com/compare)
- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [OctoCounts API docs](https://octocounts.com/docs/api)
