Skip to content

test(helpers): add comprehensive tests for HTTPError #737

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

grdsdev
Copy link
Collaborator

@grdsdev grdsdev commented Jun 30, 2025

Summary

This PR adds comprehensive test coverage for various components of the supabase-swift library:

Changes Made

  1. CI Workflow Improvements

    • Split combined linux_android job into separate linux and android jobs for better isolation
    • Uncommented library-evolution job that was previously commented out
    • Improved CI workflow organization and maintainability
  2. Test Coverage Enhancements

    • HTTPError Tests: Added comprehensive tests for HTTPError functionality
    • AnyJSON Tests: Added comprehensive and edge-case tests for AnyJSON handling
    • PostgrestError Tests: Added test to verify PostgrestError properly conforms to LocalizedError protocol

Benefits

  • Improved test coverage for error handling and data serialization
  • Better CI workflow organization with separate job isolation
  • Enhanced reliability through comprehensive edge-case testing
  • Better maintainability with well-structured test suites

Testing

All tests pass locally and in CI. The new tests cover:

  • Error message formatting and localization
  • JSON serialization edge cases
  • HTTP error handling scenarios
  • Protocol conformance validation

grdsdev added 2 commits June 30, 2025 16:40
Covers value accessors, literal initializers, error handling, extensions, and edge cases to ensure full correctness and robustness.
Add tests for the HTTPError type covering initialization, property access, and LocalizedError conformance for various data scenarios. Ensures robust error reporting and future-proofing for HTTP error handling.
@coveralls
Copy link

coveralls commented Jun 30, 2025

Pull Request Test Coverage Report for Build 15982935220

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.8%) to 76.506%

Totals Coverage Status
Change from base Build 15556137759: 0.8%
Covered Lines: 5285
Relevant Lines: 6908

💛 - Coveralls

grdsdev added 2 commits June 30, 2025 17:24
- Split combined linux_android job into separate linux and android jobs for better isolation
- Uncomment library-evolution job that was previously commented out
- Improve CI workflow organization and maintainability
- Add test to verify PostgrestError properly conforms to LocalizedError protocol
- Test ensures errorDescription property returns the expected error message
- Improves test coverage for error handling functionality
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.

2 participants