Skip to content

Commit 2870498

Browse files
github-actions[bot]CopilotlpcoxCopilot
authored
[Test Coverage] test: improve config-file.ts coverage from 55% to 99% (#2108)
* test: improve config-file.ts coverage from 55% to 99% Add comprehensive tests for all uncovered code paths in config-file.ts: - validateAwfFileConfig: non-object root, all invalid field types across every config section (network, apiProxy, security, container, environment, logging, rateLimiting), unknown key rejection, and valid combinations - loadAwfFileConfig: YAML file loading (.yml extension), stdin YAML fallback, extensionless file JSON/YAML fallback, parse error messages, validation error messages with path/stdin labels - mapAwfFileConfigToCliOptions: all fields (security, container, env, logging, rateLimiting), empty array handling, undefined passthrough - applyConfigOptionsInPlaceWithCliPrecedence: all-apply, undefined-skip, and overwrite-without-CLI-flag scenarios Coverage improvement: - config-file.ts: 55.44% → 99.48% statements, 47.75% → 99.59% branches - Overall: 83.45% → 85.65% statements, 74.72% → 79.91% branches Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update src/config-file.test.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Landon Cox <landon.cox@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
1 parent 09793c4 commit 2870498

1 file changed

Lines changed: 532 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)