{"id":13386,"library":"jest-watch-typeahead","title":"Jest Watch Typeahead","description":"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.","status":"active","version":"3.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/jest-community/jest-watch-typeahead","tags":["javascript"],"install":[{"cmd":"npm install jest-watch-typeahead","lang":"bash","label":"npm"},{"cmd":"yarn add jest-watch-typeahead","lang":"bash","label":"yarn"},{"cmd":"pnpm add jest-watch-typeahead","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"This package is a Jest plugin and requires Jest to function. It has a peer dependency on `^30.0.0` for v3.x.","package":"jest","optional":false}],"imports":[{"note":"This plugin is configured in your Jest configuration file (e.g., `jest.config.js` or `package.json`), not imported as a JavaScript module.","wrong":"import { filename } from 'jest-watch-typeahead';","symbol":"Filename Watch Plugin","correct":"module.exports = {\n  watchPlugins: ['jest-watch-typeahead/filename']\n};"},{"note":"Similar to the filename plugin, this is a path string configured directly within Jest's `watchPlugins` array.","wrong":"import { testname } from 'jest-watch-typeahead';","symbol":"Test Name Watch Plugin","correct":"module.exports = {\n  watchPlugins: ['jest-watch-typeahead/testname']\n};"},{"note":"When passing options to a watch plugin, the plugin path string and its options object must be nested together in an inner array within the `watchPlugins` array.","wrong":"module.exports = {\n  watchPlugins: [\n    'jest-watch-typeahead/filename', { key: 'k', prompt: 'Filter by filename:' }\n  ]\n};","symbol":"Configuring Plugin with Options","correct":"module.exports = {\n  watchPlugins: [\n    ['jest-watch-typeahead/filename', { key: 'k', prompt: 'Filter by filename:' }]\n  ]\n};"}],"quickstart":{"code":"{\n  \"name\": \"my-jest-project\",\n  \"version\": \"1.0.0\",\n  \"devDependencies\": {\n    \"jest\": \"^30.0.0\",\n    \"jest-watch-typeahead\": \"^3.0.0\"\n  },\n  \"scripts\": {\n    \"test:watch\": \"jest --watch\"\n  },\n  \"jest\": {\n    \"watchPlugins\": [\n      \"jest-watch-typeahead/filename\",\n      \"jest-watch-typeahead/testname\"\n    ]\n  }\n}\n\n// Then, run from your terminal:\n// npm install\n// npm run test:watch\n\n// For a jest.config.js example:\n// jest.config.js\n// module.exports = {\n//   watchPlugins: [\n//     'jest-watch-typeahead/filename',\n//     ['jest-watch-typeahead/testname', { key: 't', prompt: 'Filter by test name:' }]\n//   ]\n// };","lang":"typescript","description":"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."},"warnings":[{"fix":"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`.","message":"Version 3.0.0 of `jest-watch-typeahead` drops support for Jest 27, 28, and 29. It also drops support for Node.js versions 14, 16, 19, 21, and 23.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"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.","message":"Version 2.0.0 of `jest-watch-typeahead` dropped support for Node.js versions 12 and 17.","severity":"breaking","affected_versions":">=2.0.0 <3.0.0"},{"fix":"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' }]`.","message":"Incorrectly configuring watch plugins with options can lead to unexpected behavior or errors in Jest's watch mode.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"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.","message":"`jest-watch-typeahead` requires a compatible version of Jest as a peer dependency. Installing an incompatible Jest version will likely result in runtime errors or the plugin not activating.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'-06':73 '-19':74 '2025':72 '3.0.1':69 '30':90 'activ':149 'ahead':114 'align':79 'allow':38 'altern':128 'base':165 'cadenc':98 'capabl':116 'close':100 'compat':93 'current':65 'descript':56 'design':12 'develop':16,150,160 'differenti':107 'direct':31 'dynam':125 'e.g':86 'effici':59 'enhanc':14 'ensur':92 'evolut':104 'execut':146 'experi':17 'extens':163 'file':27 'filenam':53 'filter':24,137 'flow':147 'focus':139 'improv':58,142,158 'integr':111 'interact':20 'interfac':121 'intuit':127 'javascript':166 'jest':1,5,10,33,81,89,102,119 'jest-watch-typeahead':4 'larg':61 'lead':94 'life':157 'major':76,84 'manual':130 'mode':36 'name':30 'narrow':42 'navig':144 'new':75 'offer':122 'part':50 'path':132 'plugin':11,106 'provid':19,151 'pure':140 'qualiti':155 'quality-of-lif':154 'quick':41 'real':22 'real-tim':21 'regex':136 'releas':70,85,97 'run':47 'seamless':110 'search':115 'signific':57,153 'specif':133 'stabl':66 'static':135 'suit':63 'test':26,29,45,55,62,131,143,164 'time':23 'track':101 'type':49,113 'type-ahead':112 'typeahead':3,7 'typic':78 'user':39 'v3.0.0':87 'version':67,77 'watch':2,6,35,120 'within':32 'work':161","created_at":"2026-04-20T01:54:13.767586+00:00","updated_at":"2026-04-20T01:54:13.767586+00:00","problems":[{"fix":"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'`.","cause":"The `jest-watch-typeahead` package is either not installed, or the path in the Jest configuration is misspelled or incorrect.","error":"Error: Plugin 'jest-watch-typeahead/filename' is not a valid Jest watch plugin"},{"fix":"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.","cause":"This error often indicates an incompatibility between your Node.js version, Jest version, or `jest-watch-typeahead` version, particularly when newer syntax is used in an older environment.","error":"Jest encountered an unexpected token. This usually means that you are trying to import a file which Jest cannot parse."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/jest-community/jest-watch-typeahead","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/jest-watch-typeahead","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-18","install_tag":null}}