-
Notifications
You must be signed in to change notification settings - Fork 249
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
Remove unfetch #1450
base: master
Are you sure you want to change the base?
Remove unfetch #1450
Conversation
🦋 Changeset detectedLatest commit: 6fc2893 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
text: '', | ||
json: {}, | ||
}); | ||
fetchMock.once(RPC_URL, 500, ''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for whatever reason typescript says that fetchMock once is not defined, even though it is. I suspsect this is something to do with Jest or incorrectly configured typescript compiler (probably the first)
FAIL test/fetch_json_error.test.ts
● Test suite failed to run
test/fetch_json_error.test.ts:16:19 - error TS2339: Property 'once' does not exist on type 'FetchMockJest'.
16 fetchMock.once(RPC_URL, 500, '');
~~~~
test/fetch_json_error.test.ts:24:19 - error TS2339: Property 'once' does not exist on type 'FetchMockJest'.
24 fetchMock.once(RPC_URL, 408, '');
~~~~
test/fetch_json_error.test.ts:33:19 - error TS2339: Property 'once' does not exist on type 'FetchMockJest'.
33 fetchMock.once(RPC_URL, 400, '');
~~~~
test/fetch_json_error.test.ts:41:19 - error TS2339: Property 'once' does not exist on type 'FetchMockJest'.
41 fetchMock.once(RPC_URL, 503, '');
~~~~
Pre-flight checklist
pnpm changeset
to create achangeset
JSON document appropriate for this change.Motivation
since near-js least supported node version is v20, the polyfill could be safely dropped. React Native, and all edge runtimes all support fetch. There is no need to keep the polyfill anymore.
Test Plan
unit tests
Related issues/PRs
none