diff --git a/packages/vitest/src/integrations/chai/jest-expect.ts b/packages/vitest/src/integrations/chai/jest-expect.ts index d75f04298..6b1bf8a65 100644 --- a/packages/vitest/src/integrations/chai/jest-expect.ts +++ b/packages/vitest/src/integrations/chai/jest-expect.ts @@ -208,6 +208,7 @@ export const JestChaiExpect: ChaiPlugin = (chai, utils) => { 'expected spy to be called with arguments: #{exp}', 'expected spy to not be called with arguments: #{exp}', args, + spy.calls, ) }) const ordinalOf = (i: number) => { diff --git a/test/core/test/mock.test.ts b/test/core/test/mock.test.ts index ae2e0174f..58b0744ae 100644 --- a/test/core/test/mock.test.ts +++ b/test/core/test/mock.test.ts @@ -27,6 +27,14 @@ describe('mock', () => { expect(fn).toHaveBeenCalledWith('Hi', 1) }) + it('toHaveBeenCalledWith', () => { + const fn = vitest.fn() + + fn('Hi', 2) + + expect(fn).toHaveBeenCalledWith('Hi', 2) + }) + it('returns', () => { let i = 0