Skip to content

Conversation

@George-Ogden
Copy link

@George-Ogden George-Ogden commented Nov 29, 2025

Description

This PR allows empty lines in the snapshot file to be treated that way, without affecting other snapshot semantics.

Example

Say I have a test output that looks like this:

# Outputs README-like text Including empty newlines above and below <footer>Followed by a footer</footer>

This is saved in a snapshot as:

 """  # Outputs README-like text    Including empty newlines above and below    <footer>Followed by a footer</footer>  """

Therefore, there are two lines in this snapshot that include just spaces: " ".
This PR does not affect how the snapshots are saved, but if you trim the empty spaces on the blank lines, such as with a linting tool, the snapshot will load them as empty lines (currently, they are skipped).

Related Issues

Checklist

  • This PR has sufficient documentation.
  • This PR has sufficient test coverage.
  • This PR title satisfies semantic convention.

Additional Comments

No additional comments.

@codecov
Copy link

codecov bot commented Nov 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@ Coverage Diff @@ ## main #1042 +/- ## ======================================= Coverage 97.29% 97.30% ======================================= Files 21 21 Lines 1666 1669 +3 ======================================= + Hits 1621 1624 +3  Misses 45 45 
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants