Registry /
testing / jest-watch-select-projects
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
muslnode 18–226 runs
build_error
glibcnode 18–226 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.
Errors
Common errors & fixes
No projects found
Jest config does not have a 'projects' array, so the plugin cannot list projects.
fixAdd 'projects: ["<rootDir>/packages/*"]' or similar to your Jest config.
Cannot find module 'jest-watch-select-projects'
Plugin not installed or not in node_modules.
fixRun 'npm install --save-dev jest-watch-select-projects' or 'yarn add --dev jest-watch-select-projects'.
Audit
Dependencies
jestrequiredpeer dependency; required version >=23