jest-watch-mock-stdin
v0.1.0
Published
Jest watch plugin for mocking stdin
Downloads
3
Readme
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.