fix(vitest-angular): normalize snapshot whitespace#2237
fix(vitest-angular): normalize snapshot whitespace#2237brandonroberts merged 3 commits intoanalogjs:alphafrom
Conversation
✅ Deploy Preview for analog-blog ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for analog-app ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdded a Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…in serialized text nodes
|
@brandonroberts ready |
PR Checklist
Closes #2220
Affected scope
vitest-angularRecommended merge strategy for maintainer [optional]
Commit preservation note [optional]
What is the new behavior?
Fixture snapshots now normalize serializer output to remove trailing whitespace at the end of lines and collapse repeated blank lines.
This keeps inline snapshots stable when formatters strip trailing spaces, and it removes extra empty rows left behind after serializer cleanup removes Angular comment noise.
The change stays inside the Angular fixture snapshot serializer and adds focused regression coverage for the whitespace normalization behavior.
Test plan
nx format:checkpnpm buildpnpm testCommands run:
pnpm exec vitest run --config packages/vitest-angular/vite.config.ts packages/vitest-angular/src/lib/snapshot-serializers/angular-fixture.spec.tspnpm nx build vitest-angularDoes this PR introduce a breaking change?
Other information
This is intentionally conservative normalization: it only trims trailing spaces and collapses runs of empty lines in the final printed snapshot output.