feat: improve unit test coverage with new tests#309
Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Open
feat: improve unit test coverage with new tests#309devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Conversation
Add unit tests for: - formatNumber utility - extractEthJsErrorMessage utility - lodash utilities (isZero, lte, gte, lt, gt, isString) - FetchState and FetchError classes - transaction-reducer-helpers (getTxData, getTxMeta) - Engine logger utility (logEngineCreation) - usePrevious hook - useDebouncedValue hook These tests improve coverage for utility functions, hooks, and core engine utilities following established testing patterns. Co-Authored-By: Abhay Aggarwal <abhay.aggarwal@codeium.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or 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
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.
feat: improve unit test coverage with new tests
Summary
Adds 8 new test files to improve unit test coverage for utility functions, React hooks, and core engine utilities. All tests follow established patterns found in the existing codebase.
New test files:
app/util/formatNumber.test.ts- Number formatting with thousand separatorsapp/util/extractEthJsErrorMessage.test.ts- ethjs-rpc error message extractionapp/util/lodash/index.test.ts- Lodash-like utilities (isZero, lte, gte, lt, gt, isString)app/util/fetch/FetchState.test.ts- FetchError class and FetchState typesapp/util/transaction-reducer-helpers.test.ts- getTxData and getTxMeta functionsapp/core/Engine/utils/logger.test.ts- logEngineCreation functionapp/components/hooks/usePrevious.test.ts- usePrevious hookapp/components/hooks/useDebouncedValue.test.ts- useDebouncedValue hookReview & Testing Checklist for Human
useDebouncedValue.test.tsfake timer tests are not flaky across multiple CI runsTest Plan
yarn test:unitlocally to verify tests passNotes