Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

[experimental] Eliminate jest-fetch-mock #1867

Closed
steveluscher opened this issue Nov 20, 2023 · 2 comments · Fixed by #2173
Closed

[experimental] Eliminate jest-fetch-mock #1867

steveluscher opened this issue Nov 20, 2023 · 2 comments · Fixed by #2173
Labels
enhancement New feature or request released

Comments

@steveluscher
Copy link
Contributor

We use fetch at the heart of the http transports now, for both Node and the browser.

The fact that jest-fetch-mock depends on node-fetch (through cross-fetch) is now problematic.

In particular, it prevented us from landing #1860. node-fetch depends on Buffer so we couldn't null out Buffer for browser tests.

The task here is to create a fetch mock for tests from scratch, without jest-fetch-mock, or to find one that does not rely on node-fetch.

@steveluscher steveluscher added the enhancement New feature or request label Nov 20, 2023
steveluscher added a commit that referenced this issue Feb 24, 2024
# Summary

In this massive PR we eliminate the `fetch` mocking framework. The _only_ module that should be mocking all the way down to `fetch` is the module that depends directly on `fetch` – `@solana/rpc-transport-http`. Everything else should be able to mock one or several layers higher.

Closes #1867.
Copy link
Contributor

github-actions bot commented Mar 2, 2024

🎉 This issue has been resolved in version 1.90.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link
Contributor

Because there has been no activity on this issue for 7 days since it was closed, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant