jest-watch-typeahead is a Jest plugin designed to enhance the developer experience by providing interactive, real-time filtering of test files and test names directly within Jest's watch mode. It allows users to quickly narrow down the tests being run by typing part of a filename or test description, significantly improving efficiency in large test suites. The current stable version is 3.0.1, released on 2025-06-19. New major versions typically align with Jest's own major releases (e.g., v3.0.0 for Jest 30) to ensure compatibility, leading to a release cadence that closely tracks Jest's evolution. This plugin differentiates itself by seamlessly integrating type-ahead search capabilities into the Jest watch interface, offering a more dynamic and intuitive alternative to manual test path specification or static regex filtering. It focuses purely on improving test navigation and execution flow during active development, providing a significant quality-of-life improvement for developers working with extensive test bases.
npm install jest-watch-typeaheadVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to install `jest-watch-typeahead` and configure it in `package.json` for interactive test filtering in Jest's watch mode, including how to pass options.
Upgrade Jest to version 30 or higher and Node.js to version 18 or higher to use `jest-watch-typeahead@3.x.x`. If you need to support older Jest or Node.js versions, you must use `jest-watch-typeahead@2.x.x`.
Ensure your Node.js environment is at least version 14.x or 16.x when using `jest-watch-typeahead@2.x.x`. For `3.x.x`, Node.js 18 or higher is required.
When providing options to a watch plugin, ensure the plugin string and its options object are wrapped together in an *inner* array. For example: `['jest-watch-typeahead/filename', { key: 'f' }]`.Always check the `peerDependencies` in the `package.json` of `jest-watch-typeahead` to ensure your installed Jest version matches the required range. For `v3.x.x`, Jest `^30.0.0` is required.
Ensure `jest-watch-typeahead` is installed as a dev dependency (`npm install --save-dev jest-watch-typeahead`) and verify the plugin paths in your `jest.config.js` or `package.json` are correct: `'jest-watch-typeahead/filename'` and `'jest-watch-typeahead/testname'`.
Check the Node.js and Jest version requirements for your installed `jest-watch-typeahead` version. For `v3.x.x`, ensure Node.js >=18 and Jest >=30. Upgrade your environment or downgrade `jest-watch-typeahead` if necessary.