Skip to content

test: improve code coverage for type guards#76

Merged
michaelbe812 merged 1 commit into
mainfrom
fix/improve-code-coverage
Sep 16, 2025
Merged

test: improve code coverage for type guards#76
michaelbe812 merged 1 commit into
mainfrom
fix/improve-code-coverage

Conversation

@michaelbe812

Copy link
Copy Markdown
Owner

Summary

  • Added comprehensive test coverage for type guard functions to maintain >90% code coverage

Changes

  • Created guards.spec.ts with tests for all type guard functions:
    • isObservableOrSubjectGuard - Tests for Observable, Subject, and various non-Observable types
    • isRxStatefulConfigOrObsGuard - Tests config object detection vs Observables
    • isRxStatefulConfigOrSourceTriggerConfigGuard - Tests for trigger property presence
    • isFunctionGuard - Tests function type detection including arrow functions and classes
    • isSourceTriggerConfigGuard - Tests for sourceTriggerConfig property presence

Impact

  • Ensures type guards are working correctly across all edge cases
  • Maintains code coverage above the 90% requirement
  • All tests pass and linting succeeds

Fixes #68

- Add tests for all type guard functions in guards.ts
- Test edge cases including null, undefined, and various object types
- Ensure proper type checking for Observable, Subject, and config objects
- Contributes to maintaining >90% code coverage requirement

Addresses #68
@michaelbe812
michaelbe812 merged commit 85aac8c into main Sep 16, 2025
1 check passed
@michaelbe812
michaelbe812 deleted the fix/improve-code-coverage branch September 16, 2025 13:08
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.

Improve code coverage

1 participant