-
-
Notifications
You must be signed in to change notification settings - Fork 288
Description
Describe the bug.
While running npm run test --if-present, I noticed that the test coverage for
src/apps/cli/commands/optimize.ts is quite low.
Specifically, there does not seem to be any test covering the following execution path:
asyncapi optimize file.yml --output=overwrite --no-tty
This code path overwrites the original AsyncAPI file in place. Since this behavior is not currently covered by any automated test, regressions in this area could potentially go unnoticed.
Expected behavior
When the optimize command is executed with --output=overwrite --no-tty, the original AsyncAPI file should be overwritten correctly.
This behavior should be validated by an automated test to ensure future changes do not accidentally break or alter this functionality.
Screenshots
N/A
How to Reproduce
- Run: npm run test --if-present
- Check the coverage report
- Observe that optimize.ts has low coverage and that the --output=overwrite path is not exercised
🖥️ Device Information [optional]
- Operating System (OS): macOS
- Browser: N/A
- Browser Version: N/A
👀 Have you checked for similar open issues?
- I checked and didn't find similar issue
🏢 Have you read the Contributing Guidelines?
- I have read the Contributing Guidelines
Are you willing to work on this issue ?
Yes I am willing to submit a PR!
Metadata
Metadata
Assignees
Labels
Type
Projects
Status