serverless-jest-plugin
serverless-jest-plugin copied to clipboard
Is it possible to run jest in watch mode?
Thanks for your work on this 👍
Is it possible to run Jest in watch mode with this plugin?
I couldn't find any reference in the docs. It would be a really useful feature to add if possible!
I try to make it working by passing watch into jestrunCLI() but it doesn't seems that easy.
Would really appreciate if someone can guide us here.
The problem is the way the configuration is passed into runCLI in run-tests.js
BEFORE
return runCLI({ config },
AFTER
const cliOptions = { config }
if (config.watch === true) {
cliOptions.watch = config.watch
}
return runCLI(cliOptions,
In my serverless.yml file
plugins:
- serverless-jest-plugin
custom:
jest:
collectCoverage: true
watch: true
I'll do a pull request at some point ...