-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
Replace fetch-mock
with nock
#340
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gudahtt
force-pushed
the
replace-fetch-mock-with-nock
branch
from
February 10, 2021 07:04
81550c7
to
4bb06cc
Compare
The unit test failure is being caused by a bug in a dependency. Currently investigating how to best solve this; I'll move this back into draft in the meantime. |
Gudahtt
added a commit
that referenced
this pull request
Feb 11, 2021
The version of `ethjs-query` we're using has an unlisted dependency upon `babel-runtime`, and will crash if it's not present. Currently it's working because `babel-runtime` is being brought in by another dependency (`fetch-mock`), but that dependency is removed in another PR (#340). Until we can migrate away from using this version of `ethjs-query`, `babel-runtime` has been added as an explicit dependency to ensure it is present. `ethjs-query` is a transitive dependency of `eth-method-registry` via `ethjs`. There is a PR open on `eth-method-registry` to replace `ethjs` altogether [1]. Once those are merged and released, we can update `eth-method-registry` here and remove this `babel-runtime` dependency.
Gudahtt
added a commit
that referenced
this pull request
Feb 11, 2021
The version of `ethjs-query` we're using has an unlisted dependency upon `babel-runtime`, and will crash if it's not present. Currently it's working because `babel-runtime` is being brought in by another dependency (`fetch-mock`), but that dependency is removed in another PR (#340). Until we can migrate away from using this version of `ethjs-query`, `babel-runtime` has been added as an explicit dependency to ensure it is present. `ethjs-query` is a transitive dependency of `eth-method-registry` via `ethjs`. There is a PR open on `eth-method-registry` to replace `ethjs` altogether [1]. Once those are merged and released, we can update `eth-method-registry` here and remove this `babel-runtime` dependency. [1]: MetaMask/eth-method-registry#29
Gudahtt
force-pushed
the
replace-fetch-mock-with-nock
branch
from
February 11, 2021 14:10
4bb06cc
to
078f87e
Compare
Gudahtt
force-pushed
the
replace-fetch-mock-with-nock
branch
from
February 11, 2021 14:11
078f87e
to
288788e
Compare
The bug previously causing tests to fail has been addressed in #341 , which this PR now depends upon. |
rickycodes
previously approved these changes
Feb 11, 2021
Gudahtt
added a commit
that referenced
this pull request
Feb 11, 2021
The version of `ethjs-query` we're using has an unlisted dependency upon `babel-runtime`, and will crash if it's not present. Currently it's working because `babel-runtime` is being brought in by another dependency (`fetch-mock`), but that dependency is removed in another PR (#340). Until we can migrate away from using this version of `ethjs-query`, `babel-runtime` has been added as an explicit dependency to ensure it is present. `ethjs-query` is a transitive dependency of `eth-method-registry` via `ethjs`. There is a PR open on `eth-method-registry` to replace `ethjs` altogether [1]. Once those are merged and released, we can update `eth-method-registry` here and remove this `babel-runtime` dependency. [1]: MetaMask/eth-method-registry#29
`fetch-mock` has been replaced with `nock`. Both libraries do basically the same thing. I chose to use `nock` because the types shipped with `fetch-mock` were incorrect and they were giving me trouble. But `nock` also has a nicer API, and it's what we use for mocking `fetch` in most of our other libraries.
Gudahtt
force-pushed
the
replace-fetch-mock-with-nock
branch
from
February 11, 2021 16:55
288788e
to
2c7bf06
Compare
brad-decker
approved these changes
Feb 12, 2021
rickycodes
added a commit
that referenced
this pull request
Feb 18, 2021
…ba into feature/migrate-to-etherscan * 'feature/migrate-to-etherscan' of github.com:MetaMask/gaba: Update `sinon` and `@types/sinon` to latest versions (#352) Fix `tsconfig.json` indentation (#355) Replace `fetch-mock` with `nock` (#340) Update `ethereumjs-wallet` from v0.6.5 to v1.0.1 (#347) Add `babel-runtime` dependency required by `ethjs-query` (#341) Update `@metamask/eslint-config` from v3 to v4.1.0 (#344) Add `docs` to list of ignored eslint patterns (#345) Update `uuid` from `v3.3.3` to `v8.3.2` (#346) Update approval controller test import (#339) Add Dependabot config (#343) Update `typedoc` (#342) Remove unused test module (#338) Replace `await-semaphore` with `async-mutex` (#334) Update `eth-json-rpc-filters` in lockfile (#336)
MajorLift
pushed a commit
that referenced
this pull request
Oct 11, 2023
The version of `ethjs-query` we're using has an unlisted dependency upon `babel-runtime`, and will crash if it's not present. Currently it's working because `babel-runtime` is being brought in by another dependency (`fetch-mock`), but that dependency is removed in another PR (#340). Until we can migrate away from using this version of `ethjs-query`, `babel-runtime` has been added as an explicit dependency to ensure it is present. `ethjs-query` is a transitive dependency of `eth-method-registry` via `ethjs`. There is a PR open on `eth-method-registry` to replace `ethjs` altogether [1]. Once those are merged and released, we can update `eth-method-registry` here and remove this `babel-runtime` dependency. [1]: MetaMask/eth-method-registry#29
MajorLift
pushed a commit
that referenced
this pull request
Oct 11, 2023
`fetch-mock` has been replaced with `nock`. Both libraries do basically the same thing. I chose to use `nock` because the types shipped with `fetch-mock` were incorrect and they were giving me trouble. But `nock` also has a nicer API, and it's what we use for mocking `fetch` in most of our other libraries.
MajorLift
pushed a commit
that referenced
this pull request
Oct 11, 2023
The version of `ethjs-query` we're using has an unlisted dependency upon `babel-runtime`, and will crash if it's not present. Currently it's working because `babel-runtime` is being brought in by another dependency (`fetch-mock`), but that dependency is removed in another PR (#340). Until we can migrate away from using this version of `ethjs-query`, `babel-runtime` has been added as an explicit dependency to ensure it is present. `ethjs-query` is a transitive dependency of `eth-method-registry` via `ethjs`. There is a PR open on `eth-method-registry` to replace `ethjs` altogether [1]. Once those are merged and released, we can update `eth-method-registry` here and remove this `babel-runtime` dependency. [1]: MetaMask/eth-method-registry#29
MajorLift
pushed a commit
that referenced
this pull request
Oct 11, 2023
`fetch-mock` has been replaced with `nock`. Both libraries do basically the same thing. I chose to use `nock` because the types shipped with `fetch-mock` were incorrect and they were giving me trouble. But `nock` also has a nicer API, and it's what we use for mocking `fetch` in most of our other libraries.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fetch-mock
has been replaced withnock
. Both libraries do basically the same thing. I chose to usenock
because the types shipped withfetch-mock
were incorrect and they were giving me trouble. Butnock
also has a nicer API, and it's what we use for mockingfetch
in most of our other libraries.