Skip to content

Increase test coverage for more middleware scenarios #23

@ondrejsevcik

Description

@ondrejsevcik

The current test suite is missing coverage for several important scenarios:

Missing test scenarios:

  • Handling of empty middlewares array vs. undefined middlewares
  • Custom fetchFn parameter usage and behavior
  • Error propagation through the middleware chain
  • Middleware that does not call next()
  • Middleware that transforms request or response
  • Async middleware execution and edge cases
  • Support for multiple arguments to fetch (e.g., url, options)

Proposed actions:

  • Add test cases for each scenario listed above
  • Ensure all edge cases and error paths are covered
  • Refactor existing tests for clarity and completeness where necessary

Improving coverage for these cases will help ensure the middleware behaves correctly under all expected and edge-case conditions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions