You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"to match a snapshot containing: \"#{@expected}\""
end
This means if you're looking through the logs, debugging a failure, etc., you can end up with a really long rspec log file with:
is expected to to match a snapshot containing: <entire contents of the snapshot>
for a few hundred or thousand lines.
It's not really valuable to have the contents in the rspec output like this, and if the spec fails the failure message then includes a duplicate of it along with the actual results, increasing the overall output again.
How would you feel about alternatives:
make it optional to include the contents in the description
drop the snapshot contents and provide a generic/customisable description instead
provide a link to the snap file instead of the contents?
I'm happy to have a look and raise a PR if you're open to the suggestion.
The text was updated successfully, but these errors were encountered:
dmorgan-fa
added a commit
to dmorgan-fa/rspec-snapshot
that referenced
this issue
May 20, 2024
# What
Provide the snapshot file path rather than the contents of the snapshot in rspec description.
The snapshot can be many hundreds/thousands of lines long, and doesn't provide much benefit as the description.
- resolves: levinmr#48
Hi @levinmr, thanks for creating and maintaining this gem, it's super useful.
One thing that I've noticed that's a bit frustrating is that the entire snapshot content is included in the
rspec
description:rspec-snapshot/lib/rspec/snapshot/matchers/match_snapshot.rb
Lines 50 to 52 in 8ecbe55
This means if you're looking through the logs, debugging a failure, etc., you can end up with a really long
rspec
log file with:for a few hundred or thousand lines.
It's not really valuable to have the contents in the
rspec
output like this, and if the spec fails the failure message then includes a duplicate of it along with the actual results, increasing the overall output again.How would you feel about alternatives:
I'm happy to have a look and raise a PR if you're open to the suggestion.
The text was updated successfully, but these errors were encountered: