test(frontend): cover updateOrCreatePreset and preset guards#6691
Conversation
Automated Reviewer SuggestionsBased on the
|
There was a problem hiding this comment.
Pull request overview
This PR adds frontend unit tests to increase coverage for PresetService.updateOrCreatePreset and the Ajv-backed preset type guards, aligning with issue #6690’s goal of improving test coverage in the preset workflow.
Changes:
- Added branch-coverage tests for
PresetService.updateOrCreatePreset(identical, append, replacement-exists, implicit-delete, replace). - Added tests for the
isValidPresetandisValidPresetArrayAjv type guards.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Merged main to trigger coverage report. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6691 +/- ##
=========================================
Coverage 76.27% 76.27%
Complexity 3452 3452
=========================================
Files 1161 1161
Lines 45919 45917 -2
Branches 5100 5100
=========================================
Hits 35025 35025
+ Misses 9329 9327 -2
Partials 1565 1565
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What changes were proposed in this PR?
Any related issues, documentation, discussions?
Closes: #6690
How was this PR tested?
cd frontend && node --max-old-space-size=8192 ./node_modules/nx/dist/bin/nx.js test gui --watch=false --include=src/app/workspace/service/preset/preset.service.spec.ts, expect the suite passing.Was this PR authored or co-authored using generative AI tooling?
Co-authored with Claude Opus 4.8 in compliance with ASF