Do you want to request a feature or report a bug?
feature
What is the current behavior?
I can't ensure that all snapshots were recorded before running test in CI.
Unrecorded snapshots will be written on the CI server fs and the test suite will pass.
What is the expected behavior?
I can ensure that the test will fail if it tries to create a new snapshot.
--recordSnapshot Records snapshots.
Useful to disable when you want
to make sure all snapshot are already recoded (e.g: on CI)
Disable using --no-recordSnapshot.
[boolean] [default: true]
This is quite interesting
We should simply detect if "CI" is present. If it is, don't offer to write snapshots initially unless -u is specified. This should be the default. Happy to receive PRs for this :)
there's a other things that are different on CI,
we should just have --ci flag that adds these defaults
This'll be in Jest 20. See #3456.
Most helpful comment
We should simply detect if "CI" is present. If it is, don't offer to write snapshots initially unless -u is specified. This should be the default. Happy to receive PRs for this :)