Add snapshot tests for SVG and JSON (#1557)
These tests should fail if something is accidentally changed that affects the SVG or JSON files. In the case of deliberate changes, we can update the snapshots.
This commit is contained in:
@@ -132,7 +132,14 @@ badge preview URIs with `maxAge` – run `LONG_CACHE=true npm run build`.
|
||||
To analyze the frontend bundle, run `npm install webpack-bundle-analyzer` and
|
||||
then `ANALYZE=true npm start`.
|
||||
|
||||
[Snapshot tests][] ensure we don't inadvertently make changes that affect the
|
||||
SVG or JSON output. When deliberately changing the output, run
|
||||
`SNAPSHOT_DRY=1 npm run test:js:server` to preview changes to the saved
|
||||
snapshots, and `SNAPSHOT_UPDATE=1 npm run test:js:server` to update them.
|
||||
|
||||
|
||||
[package manager]: https://nodejs.org/en/download/package-manager/
|
||||
[snapshot tests]: https://glebbahmutov.com/blog/snapshot-testing/
|
||||
|
||||
|
||||
Hosting your own server
|
||||
|
||||
Reference in New Issue
Block a user