Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Improve unit test coverage

Open
#208 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
testing-qa

Research direction

Start by locating the existing unit tests covering typedSignatureHash, personal_sign, encryption, custom types, and array inputs. Run the current unit test suite to establish the baseline, then add focused cases for the unchecked scenarios in the issue. Done means each listed gap has coverage and the full suite passes.

Written by the indexing model from the issue text.

Description

enhancement

The unit test coverage was recently dramatically expanded, but there are still a few gaps.

  • We are missing typedSignatureHash tests for array inputs.
  • We aren't testing negative number inputs passed in as strings.
  • We aren't testing numbers encoded as strings of odd v.s. even length.
  • personal_sign isn't thoroughly tested in general (e.g. we only test '0x'-prefixed hex string inputs).
  • Encryption isn't thoroughly tested (e.g. #75 )
  • We don't have tests for naming collisions between custom types and Solidity types.
  • We don't have any tests for arrays of a set size. We only have dynamic length array tests.
  • We don't have tests for arrays of arrays.
  • We don't have tests for custom types that behave like arrays.
Dominant language
TypeScript
Stars
584
Forks
231
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MetaMask/eth-sig-util

All issues in MetaMask/eth-sig-util

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.