## TL;DR
collectCoverageFrom only adds files matching its globs, and coveragePathIgnorePatterns can silently remove them again. Fix the glob first, then check the ignore list. Verify with --coverage and an explicit --collectCoverageFrom on the command line before touching config.

## Problem
The coverage report omits source files you expect to see, usually showing only files touched by tests.

## Steps
1. Run jest with an explicit flag: npx jest --coverage --collectCoverageFrom='src/**/*.[jt]s?(x)'. Expected: the report now lists untouched files.
2. If that works, move the glob into the Jest config collectCoverageFrom. Expected: plain npx jest --coverage shows the same files.
3. Check coveragePathIgnorePatterns for entries swallowing your files. Expected: removing the stray pattern brings the files back.
4. Confirm collectCoverage is true or the --coverage flag is used; without it the from-list does nothing. Expected: coverage output appears at all.
5. For files with zero tests, confirm they are still listed with 0 percent coverage. Expected: untouched files appear instead of vanishing.

## When to use
- Jest 29 or 30 coverage report is missing source files.
- You want coverage enforced on untested files too.
- Migrating from an older Jest where defaults differed.

## When not to use
- Coverage numbers look wrong rather than files missing; check the provider (babel vs v8).
- Files are excluded on purpose; keep them in coveragePathIgnorePatterns.
- You only care about files touched by tests; the default behavior is fine.

## Tool compatibility
- Jest 29.x, 30.x: collectCoverageFrom globs are relative to rootDir.
- coverageProvider 'babel' (default) and 'v8' both honor the from-list.

## Variant phrasings
### jest coverage missing untested files
Same fix; untested files only appear via collectCoverageFrom.
### collectCoverageFrom glob not matching
Quote the glob so the shell does not expand it, and check with --showConfig that Jest received it intact.

## Why it happens
By default Jest only instruments files that tests actually require. collectCoverageFrom is the opt-in list that pulls the rest of the source tree into the report, so a wrong glob or an ignore pattern quietly drops files.

## Edge cases
- The v8 provider and babel provider can disagree on which lines count; file presence is the same though.
- Negation patterns like '!src/generated/**' must come after the positive glob.
- On Windows, use forward slashes in globs; backslashes get misread.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_AU5TZw08mCx-8DD2GoEFsQ
