Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to run jest in watch mode? #8

Open
lewisblackwood opened this issue Aug 8, 2017 · 2 comments
Open

Is it possible to run jest in watch mode? #8

lewisblackwood opened this issue Aug 8, 2017 · 2 comments

Comments

@lewisblackwood
Copy link

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!

@kinyat
Copy link
Contributor

kinyat commented Aug 22, 2017

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.

@samiratworktango
Copy link

samiratworktango commented Jul 17, 2018

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 ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants