levinmr / rspec-snapshot

RSpec snapshot testing.
MIT License
147 stars 37 forks source link

Tests pass in CI if no snapshot is found #32

Open lilasquared opened 1 year ago

lilasquared commented 1 year ago

in Jest, snapshots are not automatically written in CI, thus the test will fail if there is no snapshot. It feels like this should work the same otherwise tests are likely to slip by when snapshot names are changed.

https://jestjs.io/docs/snapshot-testing#are-snapshots-written-automatically-on-continuous-integration-ci-systems

spenserblack commented 1 year ago

After some digging, it looks like Jest uses ci-info. I'm a newbie to Ruby, so I don't know if there's an equivalent gem. (TBH I think CI=true is common enough that it's good enough)