MetaMask / MetaMask/snaps

Improve superstruct error messaging in `snaps-jest`

Open
#2,426 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
853
Forks
662
Avg merge
2d 8h
Merged PRs (30d)
8

Description

Currently we throw only the first error when it comes to superstruct assertions, it would be better to throw a message with all the errors instead of possibly having people fix errors and see failures incrementally. We may benefit from writing a wrapper to `create` here.

Contributor guide

Open the contributing guide

Research direction

Start in the snaps-jest handling for superstruct assertions and inspect how create is used. Determine how the assertion errors are collected, then verify that failures report all errors rather than only the first one.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.