Pausing/resuming jest watch mode.
Requires jest@23+.
To use jest-watch-suspend,
add it to the watchPlugins section of the Jest configuration:
{
"jest": {
"watchPlugins": [
// default
"jest-watch-suspend",
// configure
[
"jest-watch-suspend", {
// override key press
"key": "s",
// override prompt
"prompt": "suspend watch mode",
// starts in suspend mode
"suspend-on-start": true
}
]
]
}
}Suspend on start:
- (suspended) ➣
[p] + <filter>|[t] + <filter>➣[s](resume)
Setup both path and name filter before running tests:
[s](suspend) ➣[p] + <filter>&[t] + <filter>➣[s](resume)
Change multiple files before running tests:
[s](suspend) ➣ multiple changes and file saves ➣[s](resume)
Run code coverage after running some test.only() tests:
[s](suspend) ➣ changetest.only()back totest()&[e](withjest-watch-toggle-config) ➣[s](resume)