denoland / denoland/std

@std/expect: export `getMockCalls` & `MockCall`

Open
#6,838 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3.6k
Forks
681
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**

I'm using `@std/expect#fn` to record calls. I want to be able to do complex assertions on calls to the function, that are not easy to do using `expect(fn).toHaveBeenCalledWith`

**Describe the solution you'd like**

Be able to get the mock calls records and manipulate them by myself. It would also help writing custom assertions on mock calls

**Describe alternatives you've considered**

Copy/paste the `fn` implementation and manage calls directly in my test code

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.