I'm developing a new blueprint for internal teams as a kickstarter for common requirements. I'm attempting to put this blueprint on a pipeline in GitLab—not to be confused with GitHub.
Should the pipeline call npm run update-snapshots at some point? Should snapshots be "updated" prior to committing (and merging to master|main) by the committer?
I don't see blueprint examples like JHipster Native taking any GitHub actions for snapshots in that pipeline.
I have not fully grok'd this snapshot practice yet. It's mostly undocumented in JHipster blueprints, but appears to be a practice of unknown provenance or origin to this Java engineer, possibly from Mocha. But I'll be looking more into it.
Snapshots should be updated and committed with the changes to git.
It's based on jest-snapshots with the purpose of making easy for the reviewer (and the developer) to take a glance at the generated files names or the generated file content.
You can see this PR as example. The liquibase changelog snapshot is shown and we can review the generated xml at a glance.
Another examples is this other PR. The generated file renamed from
TestContainersSpringContextCustomizerFactory.javatoSqlTestContainersSpringContextCustomizerFactory.java