Skip to content

Fix unmocked block tracker warning in NetworkController tests#5289

Merged
mcmire merged 2 commits intomainfrom
fix-stray-console-error-in-nc-tests
Apr 9, 2025
Merged

Fix unmocked block tracker warning in NetworkController tests#5289
mcmire merged 2 commits intomainfrom
fix-stray-console-error-in-nc-tests

Conversation

@mcmire
Copy link
Copy Markdown
Contributor

@mcmire mcmire commented Feb 5, 2025

Explanation

When running one of the tests for NetworkController, we were seeing a warning in the test output indicating that a request from the block tracker was not properly mocked. This commit adds that mock so the warning goes away.

References

(None)

Changelog

(N/A, developer-only change)

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

When running one of the tests for the `destroy` method, an error from
the block tracker can be observed. This error does not fail the test,
but it creates noise in the output. It turns out that this happens
because we are failing to mock a request in the test. This commit adds
the requisite test so that the `console.error` goes away.
@mcmire mcmire marked this pull request as ready for review February 6, 2025 00:23
@mcmire mcmire requested review from a team as code owners February 6, 2025 00:23
@mcmire mcmire changed the title Fix stray console.error in NetworkController tests Fix unmocked block tracker warning in NetworkController tests Feb 6, 2025
@mcmire mcmire added the team-wallet-framework Deprecated: Please use `team-core-platform` instead. label Feb 6, 2025
@mcmire mcmire enabled auto-merge (squash) April 9, 2025 15:40
@mcmire mcmire merged commit 0b552d4 into main Apr 9, 2025
198 checks passed
@mcmire mcmire deleted the fix-stray-console-error-in-nc-tests branch April 9, 2025 16:30
matallui added a commit that referenced this pull request Apr 9, 2025
* main:
  Fix unmocked block tracker warning in NetworkController tests (#5289)
  ci: GH action to remind developers to add release notes in CHANGELOG.md (#5620)
  Release 355.0.0 (#5619)
  Release 354.0.0 (#5615)
  fix: Update origin in Snap requests (#5616)
  Release/353.0.0 (#5612)
  refactor(accounts-controller): use type-cast instead of `@ts-expect-error` (#5568)
  feat: support external sign transactions (#5604)
  feat: extend isAtomicBatchSupported result (#5600)
  fix: Rename `enableTxParamsGasFeeUpdates` to `isAutomaticGasFeeUpdateEnabled` and also callback (#5602)
  Release/352.0.0 (#5608)
  feat: STAKE-1005: refresh staking data when staking txs are confirmed (#5607)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-wallet-framework Deprecated: Please use `team-core-platform` instead.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants