Bash script which checks snapshot files for str @generated on first line, if not found it is added. Runs prior to npm run test. Related to task T1918.
Details
- Reviewers
bytesofman - Group Reviewers
Restricted Project - Commits
- rABC59c05c254810: [Cashtab]Auto add @generated to top of updated snapshot files
Remove @generated from top snapshot files
npm run test || npm run pretest
ensure that 7 files now have @generated appended to first line
npm run test || npm run pretest
ensure that 7 files do not now have a second @generated appended to first line
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Nice -- this is a great start. Some improvements in the in-line comments.
web/cashtab/scripts/addGenerated.sh | ||
---|---|---|
8 ↗ | (On Diff #30688) | Could drop the else from these functions; only do the sed if you get a false from the if condition. |
68 ↗ | (On Diff #30688) | Writing each function individually and then calling them all will work. However, it would be better to write some kind of loop. Here is some pseudocode
|
web/cashtab/src/components/Common/__tests__/__snapshots__/StyledCollapse.test.js.snap | ||
---|---|---|
1 ↗ | (On Diff #30712) | Diff looks good. Please remove @generated from all these files, and the space preceding it, and then run npm pretest This diff shouldn't be adding an extra space before @generated on all these files, will end up keeping it forever or slowly losing it one at a time as snapshots are updated. |