https://github.com/jest-community/jest-watch-typeahead
Jest watch plugin for filtering test by file name or test name
https://github.com/jest-community/jest-watch-typeahead
Last synced: about 2 months ago
JSON representation
Jest watch plugin for filtering test by file name or test name
- Host: GitHub
- URL: https://github.com/jest-community/jest-watch-typeahead
- Owner: jest-community
- License: mit
- Created: 2018-03-24T03:14:53.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2025-04-14T05:52:08.000Z (about 2 months ago)
- Last Synced: 2025-04-14T06:34:17.116Z (about 2 months ago)
- Language: TypeScript
- Homepage:
- Size: 9.89 MB
- Stars: 409
- Watchers: 3
- Forks: 16
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-jest - jest-watch-typeahead
README
[](https://github.com/jest-community/jest-watch-typeahead/actions/workflows/nodejs.yml) [](https://badge.fury.io/js/jest-watch-typeahead)

## Usage
### Install
Install `jest`_(it needs Jest 27+)_ and `jest-watch-typeahead`
```bash
yarn add --dev jest jest-watch-typeahead# or with NPM
npm install --save-dev jest jest-watch-typeahead
```### Add it to your Jest config
In your `package.json`
```json
{
"jest": {
"watchPlugins": [
"jest-watch-typeahead/filename",
"jest-watch-typeahead/testname"
]
}
}
```Or in `jest.config.js`
```js
module.exports = {
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
],
};
```### Configuring your key and prompt name
```js
module.exports = {
watchPlugins: [
[
'jest-watch-typeahead/filename',
{
key: 'k',
prompt: 'do something with my custom prompt',
},
],
],
};
```### Run Jest in watch mode
```bash
yarn jest --watch
```