Skip to content
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

Mock endpoints during tests #1

Closed
5 tasks done
bitpshr opened this issue Jun 29, 2018 · 1 comment · Fixed by #1499
Closed
5 tasks done

Mock endpoints during tests #1

bitpshr opened this issue Jun 29, 2018 · 1 comment · Fixed by #1499
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@bitpshr
Copy link
Contributor

bitpshr commented Jun 29, 2018

The current test suite doesn't mock any endpoints during unit testing. Instead, they either hit real endpoints or skip request entirely. We should be setting nock.disableNetConnect(); in the unit test setup to ensure that none of our tests will send real network requests, but first we'll have to migrate each test that relies upon the network to use mocks.

EDITED TO ADD:

Here are a list of controllers that have tests in which we need to mock network requests:

@bitpshr bitpshr added enhancement New feature or request good first issue Good for newcomers labels Jun 29, 2018
@jennypollack jennypollack self-assigned this Jun 11, 2019
@Gudahtt Gudahtt mentioned this issue Mar 18, 2021
49 tasks
@mcmire mcmire self-assigned this Mar 14, 2022
@mcmire

This comment was marked as duplicate.

@mcmire mcmire mentioned this issue Jul 13, 2023
3 tasks
mcmire pushed a commit that referenced this issue Jul 17, 2023
Renames the package to `@metamask/utils`.
MajorLift pushed a commit that referenced this issue Sep 22, 2023
Bumps [@metamask/eslint-config-jest](https://github.com/MetaMask/eslint-config) from 11.0.0 to 11.1.0.
- [Release notes](https://github.com/MetaMask/eslint-config/releases)
- [Commits](MetaMask/eslint-config@v11.0.0...v11.1.0)

---
updated-dependencies:
- dependency-name: "@metamask/eslint-config-jest"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants