Skip to content

Improve unit tests #413

Closed as not planned
Closed as not planned

Description

@Gudahtt

This is a tracking issue for improving unit tests in various ways.

Related issues:

Some general advice: writing unit tests should be easy. They may be verbose and time consuming to write, but they should be easy. If it's not easy, change the API under test to make it easy.

Many of the APIs in this repository make unit testing difficult. Your time is better spent improving the API first and writing simple unit tests, rather than struggling to write complex tests for a complex API. Consider ways to reduce the API surface, reduce dependencies, inject dependencies to simplify stubbing, and move complex functionality into separate modules.

Tracker by module:

Check off each module as they are audited for each of the criteria outlined above.

  • ./src/announcement/AnnouncementController.test.ts
  • ./src/permissions/Caveat.test.ts
  • ./src/permissions/PermissionController.test.ts
  • ./src/permissions/rpc-methods/requestPermissions.test.ts
  • ./src/permissions/rpc-methods/getPermissions.test.ts
  • ./src/permissions/errors.test.ts
  • ./src/permissions/Permission.test.ts
  • ./src/keyring/KeyringController.test.ts
  • ./src/notification/NotificationController.test.ts
  • ./src/third-party/EnsController.test.ts
  • ./src/third-party/PhishingController.test.ts
  • ./src/BaseControllerV2.test.ts
  • ./src/message-manager/MessageManager.test.ts
  • ./src/message-manager/AbstractMessageManager.test.ts
  • ./src/message-manager/PersonalMessageManager.test.ts
  • ./src/message-manager/TypedMessageManager.test.ts
  • ./src/assets/AccountTrackerController.test.ts
  • ./src/assets/AssetsContractController.test.ts
  • ./src/assets/NftController.test.ts
  • ./src/assets/assetsUtil.test.ts
  • ./src/assets/CurrencyRateController.test.ts
  • ./src/assets/TokenBalancesController.test.ts
  • ./src/assets/TokenListController.test.ts
  • ./src/assets/TokenDetectionController.test.ts
  • ./src/assets/NftDetectionController.test.ts
  • ./src/assets/TokensController.test.ts
  • ./src/assets/TokenRatesController.test.ts
  • ./src/assets/Standards/NftStandards/ERC721/ERC721Standard.test.ts
  • ./src/assets/Standards/NftStandards/ERC1155/ERC1155Standard.test.ts
  • ./src/assets/Standards/ERC20Standard.test.ts
  • ./src/user/AddressBookController.test.ts
  • ./src/user/PreferencesController.test.ts
  • ./src/subject-metadata/SubjectMetadataController.test.ts
  • ./src/network/NetworkController.test.ts
  • ./src/ControllerMessenger.test.ts
  • ./src/ratelimit/RateLimitController.test.ts
  • ./src/gas/fetchGasEstimatesViaEthFeeHistory.test.ts
  • ./src/gas/fetchGasEstimatesViaEthFeeHistory/calculateGasFeeEstimatesForPriorityLevels.test.ts
  • ./src/gas/gas-util.test.ts
  • ./src/gas/determineGasFeeCalculations.test.ts
  • ./src/gas/fetchBlockFeeHistory.test.ts
  • ./src/gas/GasFeeController.test.ts
  • ./src/BaseController.test.ts
  • ./src/ComposableController.test.ts
  • ./src/transaction/TransactionController.test.ts
  • ./src/util.test.ts
  • ./src/apis/crypto-compare.test.ts
  • ./src/apis/token-service.test.ts
  • ./src/approval/ApprovalController.test.ts

Activity

  1. added theissue type on Jul 9, 2025
  2. exalate-issue-sync commented on Oct 2, 2026

    @exalate-issue-sync

    Elliot Winkler commented: Closing this ticket because we do not have capacity at present to do maintenance work on these packages. We can create smaller “API improvement” tickets for packages that we own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions