## TL;DR
When jest `projects` misses packages it is usually a glob problem: the pattern does not match the package dir, or a matched package has no config file for jest to find. List each package explicitly or use a glob that matches every package root, and make sure each entry points at a directory containing a jest config (or pass the config object inline). Run `npx jest --listTests` to see exactly which projects jest discovered before debugging further.

## The query
```text
jest projects config not picking up all packages: monorepo fix
```

## Use this when
- `jest --projects` runs only some monorepo packages
- A new package's tests never execute in CI
- Per-package jest configs seem to be ignored
- Migrating a monorepo from per-package runs to one jest invocation

## Not for
- Single-package jest configuration
- Turborepo / nx task orchestration issues
- Module resolution errors inside a found package

## Steps
1. Run `npx jest --listTests` and compare the output against your full package list. Expected output: the test list shows exactly which packages jest discovered; missing ones are confirmed absent.
2. Inspect the `projects` globs in the root config and test each against the real directory layout (a glob like `[packages]/*` silently skips nested or oddly named dirs). Expected output: you identify the glob entries that fail to match the missing packages.
3. Fix the match: widen the glob or list package dirs explicitly, and verify each listed dir contains a jest config file (package.json `jest` key or jest.config). Expected output: every package dir resolves to a discoverable config.
4. Re-run `--listTests` and then the suite, confirming all packages appear and run. Expected output: test count matches the sum across packages; CI runs everything.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_BkO8uU5UN-n3ctseGJpAiA
