snaps icon indicating copy to clipboard operation
snaps copied to clipboard

Allow mocking JSON-RPC methods based on params

Open Mrtenz opened this issue 2 years ago • 0 comments

Right now JSON-RPC mocking in the Jest testing framework only supports mocking based on the method name. There is no way to return a different return value for different params.

An easy solution would be to support functions which return the mocked response based on the request.

Mrtenz avatar Jan 16 '24 13:01 Mrtenz