Usage
Install
Install jest-watch-mock-stdin
yarn add --dev jest jest-watch-mock-stdin # or with NPM npm install --save-dev jest jest-watch-mock-stdin
Add it to your Jest config
In your jestConfig
watchPlugins: "jest-watch-mock-stdin" input: keys: 'p' 'b' 'a' 'r' '\n' keys: 'q'
The keys inside the keys
array will be type immediately one after the other. It will wait for a test run to be completed before moving to the next keys
array
Fox example, the config above will:
- Press P to filter by filename
- Enter 'bar' and press enter in the "filter by filename prompts"
- Wait for the test run to end.
- Press Q to quit Jest.