Something to explain to people new to the concept that this is a generated file and perhaps a link that explains how snapshotting works :)
I think that will be quite annoying if you have looads of snapshot files and all of them have the same header.
Hmmm... I was just thing something like:
// this is a generated file. Learn more: bit.ly/jest
Something simple so new people don't try to edit the file directly. I honestly don't see any problem with having the same comment in every file. I would expect people to naturally glaze over the top of the file anyway. I'd get used to it anyway :)
I think to do this we need two things:
I'd be happy to write a blogpost for the Jest blog sometime.
For the wording, how about:
// this file is generated, learn more: http://bit.ly/jest-snapshot
I'm sure that'd fit on one line on pretty much anyone's screen.
@cpojer Is this still needed? I'd be happy to try and tackle this one if @kentcdodds don't want it.
Go ahead :-)
I'm gonna close this out due to inactivity. It hasn't really come up, so I'm inclined to keep snapshot files to the bare minimum.
I just move to jest 22, and I have a lot of .snap files, now I have to commit all of them again =/
@gabrielAnzaldo not sure what the issue is? Did it create new snap files? If so, can you open up a new issue?
@SimenB it adds at the top of the snap file the comment: '// this file is generated, learn more: http://bit.ly/jest-snapshot'.
This header is appearing in all of my snap files in the header, after running with the -u parameter.
Yes, this is expected. So you commit all the snapshot files again and continue on.
@gabrielAnzaldo you should get a fair warning message in the console about this.
Most helpful comment
I'd be happy to write a blogpost for the Jest blog sometime.
For the wording, how about:
I'm sure that'd fit on one line on pretty much anyone's screen.