• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

valkyrjaio / sindri-java / 30376743049
100%

Build:
DEFAULT BRANCH: 26.x
Ran 28 Jul 2026 04:08PM UTC
Jobs 1
Files 90
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 Jul 2026 04:07PM UTC coverage: 99.951%. Remained the same
30376743049

push

github

web-flow
[Generator] Refresh the golden snapshots via a GOLDEN_UPDATE environment switch (#57)

# Description

Refreshing a golden snapshot after an intentional generator change
currently
means editing the test: the class docs instruct you to temporarily
re-add a
`Files.writeString(golden, actual)` call inside `assertGolden`, run the
suite,
then remove it again. That is easy to get wrong in both directions —
forgetting
to remove the line turns every golden into a self-fulfilling snapshot
that can
never fail.

The TypeScript port already solved this: its `assertGolden` rewrites
each
`./golden/*.golden` when `GOLDEN_UPDATE=1` is set, so refreshing is a
one-off
environment variable and the committed test always asserts. This brings
the Java
suite to parity.

Verified by corrupting `AppEventData.golden`: the suite fails on it
normally, and
a `GOLDEN_UPDATE=1` run rewrites it byte-identical to the generator
output and
passes. Coverage is unaffected — JaCoCo measures `src/main/java` only.

## Types of changes

- [x] Improvement _(non-breaking change which improves code)_
- [ ] Bug fix _(non-breaking change which fixes an issue)_
- [ ] New feature _(non-breaking change which adds functionality)_
- [ ] Deprecation _(breaking change which removes functionality)_
- [ ] Breaking change _(fix or feature that would cause existing
functionality to change)_
- [ ] Documentation improvement

## Changes

- **`GoldenSnapshotTest.java`** — `assertGolden` rewrites the committed
golden
from the generated source when `GOLDEN_UPDATE=1` is set before
comparing,
mirroring the TypeScript port's switch; the class docs now describe that
  workflow instead of the edit-the-test-and-revert dance.

526 of 527 branches covered (99.81%)

Branch coverage included in aggregate %.

1515 of 1515 relevant lines covered (100.0%)

4.39 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30376743049.1 28 Jul 2026 04:08PM UTC 90
99.95
GitHub Action Run
Source Files on build 30376743049
  • Tree
  • List 90
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #30376743049
  • 550bee4f on github
  • Prev Build on 26.x (#30376190615)
  • Next Build on 26.x (#30376911574)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc