Skip to content

TestClient.revert doesn't check for errors #5064

Description

@CodeSandwich

Check existing issues

Viem Version

2.48.1

Current Behavior

Calling TestClient.revert with an invalid, malformed or nonexinstent snapshot ID is a failure that is not observable when calling the function.

Expected Behavior

An issue like this should throw an error. In most cases it will crash the test in which it's used, which is the correct behavior because the snapshot handling logic must be invalid and the chain is in an unexpected state. The users may explicitly choose to catch and ignore the error to return to the current behavior.

Steps To Reproduce

No response

Link to Minimal Reproducible Example

No response

Anything else?

No response

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions