-
-
Notifications
You must be signed in to change notification settings - Fork 382
Description
The utility function parseAsyncAPIDocumentFromFile contains non-trivial control flow that is currently not fully covered by tests, specifically around input validation and error handling.
While the happy path (successful parsing) is exercised indirectly via higher-level tests, two important behaviors remain unverified:
Input validation logic
The function explicitly guards against invalid asyncapiFilepath values (non-string or empty/whitespace strings), but there are no direct tests asserting that these cases throw the expected error.
Error wrapping when parsing fails
When the underlying AsyncAPI parser throws, the function catches the error and rethrows a new error with a normalized message. This wrapping behavior defines part of the public error contract, but it is currently untested.
Affected file :-generator\apps\keeper\src\utils.js