Describe the bug.
Ran npm run test --if-present and noticed low test coverage in
src/apps/cli/commands/optimize.ts.
Specifically, there is no test covering the --output=overwrite path:
asyncapi optimize file.yml --output=overwrite --no-tty
This code path overwrites the original AsyncAPI file, so missing coverage could allow regressions to go unnoticed.
Expected behavior
The optimize command should overwrite the original AsyncAPI file when --output=overwrite --no-tty is used, and this behavior should be covered by an automated test to ensure regressions are detected.
Screenshots
How to Reproduce
- run
npm run test --if-present
- see the coverage
🖥️ Device Information [optional]
- Operating System (OS):
- Browser:
- Browser Version:
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
Yes I am willing to submit a PR!
Describe the bug.
Ran npm run test --if-present and noticed low test coverage in
src/apps/cli/commands/optimize.ts.
Specifically, there is no test covering the --output=overwrite path:
asyncapi optimize file.yml --output=overwrite --no-tty
This code path overwrites the original AsyncAPI file, so missing coverage could allow regressions to go unnoticed.
Expected behavior
The optimize command should overwrite the original AsyncAPI file when --output=overwrite --no-tty is used, and this behavior should be covered by an automated test to ensure regressions are detected.
Screenshots
How to Reproduce
npm run test --if-present🖥️ Device Information [optional]
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
Yes I am willing to submit a PR!