DEV Community

Why `vitest --changed` misses some tests (and how runtime coverage fixes it) (opens in new tab)

Discussed on DEV

Your CI re-runs the entire test suite on every push. But a one-line change can only break a handful of tests. The rest is wasted compute — and wasted minutes you spend waiting. The usual fix is "run only the tests affected by my change." Vitest and Jest ship this: vitest --changed jest --onlyChanged jest --findRelatedTests These are great. But they share a blind spot, and that blind spot can make them skip a test that your change actually breaks — the worst possible failure for a test...

Read the original article
Sign in to keep reading the full article.

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help