Do you want to request a _feature_ or report a _bug_?
Feature Request
What is the current behavior?
I sometimes like to write my tests before writing my implementation (TDD/BDD/etc). Occasionally while doing this, I need to assert some large output that I feel is best handled using a snapshot. However, I don't want to write the snapshot to disk until the code has been implemented, because I'll have to keep updating it. So I write this a lot:
expect(actual).toEqual("SNAPSHOT")
I use this as a placeholder that I expect to fail, and then once I'm ready to write the snapshot, I change it to the toMatchSnapshot matcher, then go review the snapshot (but if it was wrong, then I need to either keep updating it, or delete the snapshot).
It'd be nice if the watcher had a mode where it didn't write snapshots until I approved them, and if I didn't approve them by the time tests had to run again, it would move on without writing anything. As a bonus, I think requiring approval would help encourage me to verify my snapshot content rather than writing whatever the current behavior is and calling it good, at risk that it's not (which is very easy to do with snapshots right now).
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal repository on GitHub that we can npm install and npm test.
N/A
What is the expected behavior?
N/A
Run Jest again with --debug and provide the full configuration it prints. Please mention your node and npm version and operating system.
N/A
Maybe something like git add -up
Maybe it makes sense to require -u for snapshot creation.
When I first use toMatchSnapshot, I need to find the snapshot file and review it manually. Why not stop creating snapshot files unless -u flag is passed?
This would be a breaking change though.
I think we could connect this with interactively updating the snapshots so it's more convenient.
Come up with the same idea. How about extra flag --updateSnapshotInteractive, where a user will be asked before updating every snapshot? Also, --updateSnapshot will effectively become something like --updateAllSnapshots.
How about actually start working on it? I can contribute, if I will get a starting point for it.
I think here is where I'd start:
I'd start looking at watch.js and getting the list of test results and then trying to apply that as "pattern" + testNamePattern (See #1860, which we may need for this as well).
To fix this issue, I came up with this.
http://g.recordit.co/0vJJvBDofA.gif

I tried to show each individual failed snapshot, but did not succeed yet.
I would love some feedback on the UX before submitting a PR.
That's awesome. Please submit a PR.
I submitted a PR, but need some help on how to write tests for the "watch.js".
I was just thinking about this feature and wanting to implement it, thanks for making it happen @genintho!
Most helpful comment
To fix this issue, I came up with this.
http://g.recordit.co/0vJJvBDofA.gif
I tried to show each individual failed snapshot, but did not succeed yet.
I would love some feedback on the UX before submitting a PR.