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

Add --update and --watch #1

Closed
ai opened this issue Feb 13, 2020 · 2 comments
Closed

Add --update and --watch #1

ai opened this issue Feb 13, 2020 · 2 comments

Comments

@ai
Copy link
Owner

@ai ai commented Feb 13, 2020

--update should call jest [TESTS WITH SNAPSHOTS] -u and print snapshots.

--watch should call --update on any .js file changes in the current project.

LordotU added a commit to LordotU/print-snapshots that referenced this issue Feb 20, 2020
LordotU added a commit to LordotU/print-snapshots that referenced this issue Feb 20, 2020
@ai

This comment has been minimized.

Copy link
Owner Author

@ai ai commented Feb 22, 2020

@LordotU oh, I forgot to check an important part of this issue, which was mentioned at Cult of Martians.

In --update we need to call only tests with snapshots. We do not need to call all tests since it could be 10x slower.

So before calling jest -u we need to:

  1. Collect *.snap files
  2. Convert files content to test files names (like index.test.js) and test names (like prints error message)
  3. We need to send to jest CLI only specific test files and specific tests (if it is possible to specify test by names).
@LordotU

This comment has been minimized.

Copy link
Contributor

@LordotU LordotU commented Feb 22, 2020

@ai Oh, I've found that issue just here and missed at the Cult site. Okay, will fix that.

@ai ai closed this Feb 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.