Skip to content

Add comprehensive unit tests for deploy/impl modules and fix related …#88

Merged
rsonghuster merged 1 commit intomasterfrom
add-test
Sep 24, 2025
Merged

Add comprehensive unit tests for deploy/impl modules and fix related …#88
rsonghuster merged 1 commit intomasterfrom
add-test

Conversation

@rsonghuster
Copy link
Copy Markdown
Contributor

…issues

This commit adds comprehensive unit tests for all major classes in the src/subCommands/deploy/impl directory, significantly improving test coverage:

  1. Added complete unit tests for AsyncInvokeConfig class (async_invoke_config.ts)
  2. Added complete unit tests for ConcurrencyConfig class (concurrency_config.ts)
  3. Added complete unit tests for CustomDomain class (custom_domain.ts)
  4. Added complete unit tests for ProvisionConfig class (provision_config.ts)
  5. Added complete unit tests for Service class (function.ts)

Key improvements made:

  • Fixed module import paths in test files
  • Resolved mockResolvedValue call issues with proper parameter handling
  • Addressed type mismatch problems in test data structures
  • Fixed private method access in tests using type assertions
  • Corrected logger mock implementations to match actual logger interface
  • Fixed credentials property name inconsistencies (credentials → credential)
  • Resolved various other test-related issues

…issues

This commit adds comprehensive unit tests for all major classes in the src/subCommands/deploy/impl directory, significantly improving test coverage:

1. Added complete unit tests for AsyncInvokeConfig class (async_invoke_config.ts)
2. Added complete unit tests for ConcurrencyConfig class (concurrency_config.ts)
3. Added complete unit tests for CustomDomain class (custom_domain.ts)
4. Added complete unit tests for ProvisionConfig class (provision_config.ts)
5. Added complete unit tests for Service class (function.ts)

Key improvements made:
- Fixed module import paths in test files
- Resolved mockResolvedValue call issues with proper parameter handling
- Addressed type mismatch problems in test data structures
- Fixed private method access in tests using type assertions
- Corrected logger mock implementations to match actual logger interface
- Fixed credentials property name inconsistencies (credentials → credential)
- Resolved various other test-related issues

Test coverage for deploy/impl directory improved from very low to 70.78%, with individual files achieving:
- async_invoke_config.ts: 85.18%
- concurrency_config.ts: 84.61%
- custom_domain.ts: 88.6%
- function.ts: 66.35%
- provision_config.ts: 91.66%

All 482 tests are now passing successfully.
@rsonghuster rsonghuster merged commit a93c0ab into master Sep 24, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant