Registry / testing / jest-watch-select-projects

jest-watch-select-projects

JSON →
library2.0.0jsnpmunverified

Jest watch plugin (v2.0.0) that allows selecting which Jest projects to run when using Jest's --watch mode with multiple projects. Part of the jest-community ecosystem. Requires Jest 23+ and Node >=8. Key differentiator: interactive project selection in watch mode with keyboard navigation (space to toggle, enter to confirm), using displayName or basename. Minimal API surface but critical for monorepo workflows.

npm install jest-watch-select-projects
INSTALL
IMPORT
SIG · JEST-WATCH-SELECT-
J
jest-watch-select-projects
testingjavascriptv2.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
module.exports = { watchPlugins: ['jest-watch-select-projects'] }
import jestWatchSelectProjects from 'jest-watch-select-projects'
No default export; configured as a plugin name string in Jest config
module.exports (config)
module.exports = { watchPlugins: ['jest-watch-select-projects'] }
module.exports = { watchPlugins: [require('jest-watch-select-projects')] }
Do not require the module; use string name. Jest resolves it internally.
with options
watchPlugins: [ ['jest-watch-select-projects', { key: 'X', prompt() { ... } } ] ]
watchPlugins: [ 'jest-watch-select-projects', { key: 'X' } ]
Options must be in a sub-array with the plugin name

Sets up jest-watch-select-projects in Jest config and runs watch mode with project selection.

// jest.config.js module.exports = { projects: ['<rootDir>/packages/*'], watchPlugins: ['jest-watch-select-projects'], }; // package.json scripts // "test:watch": "jest --watch" // Run: npm run test:watch // Press SPACE to toggle project selection, ENTER to confirm.
Debug
Known issues
gotchaPlugin does not work without Jest's --watch flag. Running jest without --watch will ignore the plugin.
fix
Ensure you run 'jest --watch' or 'jest --watchAll'.
affects: all
gotchaIf projects do not have displayName in their Jest config, the plugin uses the basename of the project path. If multiple projects have the same basename (e.g., two folders named 'utils'), selection can be confusing.
fix
Set unique displayName in each project's Jest config.
affects: all
breakingv2.0.0 dropped support for Node versions below 8, which may break CI pipelines using older Node.
fix
Upgrade Node to >=8.
affects: >=2.0.0
gotchaPlugin requires Jest 23 or newer. Older Jest versions do not support watchPlugins.
fix
Upgrade Jest to >=23.
affects: all
Errors
Common errors & fixes
No projects found
Jest config does not have a 'projects' array, so the plugin cannot list projects.
fix
Add 'projects: ["<rootDir>/packages/*"]' or similar to your Jest config.
Cannot find module 'jest-watch-select-projects'
Plugin not installed or not in node_modules.
fix
Run 'npm install --save-dev jest-watch-select-projects' or 'yarn add --dev jest-watch-select-projects'.
Upgrade
Version history
2.0.0latest on npm
Audit
Dependencies
jestrequiredpeer dependency; required version >=23
Agent activity
4 hits · last 30 days
node
4
Resources
jest-watch-select-projects — npm install jest-watch-select-projects · libregistry