test(optimize): add metrics coverage for selected optimizations
What this PR does
This PR adds missing test coverage for the --output=overwrite path in the optimize command.
While running the test suite, I noticed that the overwrite behavior wasn’t covered, even though this path updates the original AsyncAPI file. This test makes sure that behavior is exercised and helps protect against future regressions.
Why this is needed
Overwriting the original spec file is a sensitive operation, and having it untested could allow unintended changes to slip in unnoticed. Adding coverage here felt like a small but useful improvement.
What’s included
- A unit test that verifies the original file is overwritten when
--output=overwrite --no-ttyis used - Assertions around the expected behavior without changing any existing logic
Related
Related to #1944
⚠️ No Changeset found
Latest commit: a8ac515db47f07977aa85c96bc4a9478f0ec753c
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
/u
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
This pull request has been automatically marked as stale because it has not had recent activity :sleeping:
It will be closed in 120 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation.
There can be many reasons why some specific pull request has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.
Let us figure out together how to push this pull request forward. Connect with us through one of many communication channels we established here.
Thank you for your patience :heart: