Closed jacoberdman2147 closed 1 week ago
Name | Link |
---|---|
Latest commit | f137bbe1cdf6ebfd6947b42e9e0641a0be23f71c |
Latest deploy log | https://app.netlify.com/sites/vitest-dev/deploys/6734cd236cefd70008b4f204 |
Deploy Preview | https://deploy-preview-6894--vitest-dev.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Thanks for picking this up! I didn't mention it in the issue, but probably we can just use toHaveBeenCalledExactlyOnceWith
naming from jest-extend (for alignment and for explicitness). Do you see any reason not to do that?
Other than that, the code looks good to me :+1:
Ah yeah, I was on the fence about naming, the more official doc I found suggested it should be toHaveBeenCalledExactlyOnceWith
but I felt like I saw more references to toHaveBeenCalledOnceWith
and just went with it because it was in the issue title. I'll quickly rename it.
This is my first time putting a PR up on Github, how do I actually merge the PR now that it's approved and such?
The exact process depends on project, but in our case, your change is a new feature, so we'll wait until next minor release. That's why I put it in 2.2.0 milestone https://github.com/vitest-dev/vitest/milestone/21
Description
This PR adds an
expect.toHaveBeenCalledOnceWith
method which asserts that a method has been called with the given arguments and has been called exactly once.This fixes #6849
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
pnpm-lock.yaml
unless you introduce a new test example.Tests
pnpm test:ci
.Documentation
pnpm run docs
command.Changesets
feat:
,fix:
,perf:
,docs:
, orchore:
.