meilisearch-js icon indicating copy to clipboard operation
meilisearch-js copied to clipboard

Refactor client tests, deprecate `addProtocolIfNotPresent`, fix abort bug, adjust documentation

Open flevi29 opened this issue 7 months ago • 2 comments

Pull Request

Related issue

Fixes #1922

What does this PR do?

  • fixes bug where the wrong abort controller is passed to fetch
  • adjusts documentation
  • deprecates missing protocol in provided host
  • refactors tests
    • removes some index tests, which are covered by #1918
    • moved some method tests to their own files (health, stats and some others)
    • removed bad host and permission tests #1945

Summary by CodeRabbit

  • Refactor

    • Improved header management and timeout handling for HTTP requests.
    • Simplified and clarified internal documentation comments.
    • Enhanced URL protocol handling and removed deprecated utility functions.
  • Bug Fixes

    • Improved error handling for task timeouts to prevent unexpected errors.
  • Tests

    • Added new tests for health, stats, version, network, and core client functionality.
    • Removed outdated or redundant test suites to streamline testing.

flevi29 avatar Apr 21 '25 09:04 flevi29