Skip to content

Conversation

Nkovaturient
Copy link
Contributor

PR #155

fix: content routing provider data handling and test cases

Description

Fixed the content routing implementation to ensure proper handling of provider data and JSON content types. All test cases are now passing across different environments (Node.js, Browser, WebWorker).

Key improvements:

  • Added proper Content-Type: application/json headers
  • Fixed provider data JSON formatting
  • Added routing initialization in tests
  • Fixed multiaddrs format handling in assertions

Test Results:

  • Node.js: 23 passing, 2 pending
  • Browser: 25 passing
  • WebWorker: 23 passing, 2 pending

Note: The 2 pending tests are related to cache TTL functionality, which is expected behavior.

Notes & open questions

None - all test cases are passing as expected across environments.

Change checklist

  • [✅] I have performed a self-review of my own code
  • [✅] I have made corresponding changes to the documentation (updated test cases with proper JSON formatting)
  • [✅] I have added tests that prove my fix is effective
    • [✅] Followed IPFS/Helia eslint practices

@Nkovaturient Nkovaturient requested a review from a team as a code owner February 4, 2025 19:26
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