📝 Prefer toHaveBeenCalledExactlyOnceWith over toHaveBeenCalledOnce and toHaveBeenCalledWith.
💼recommended config. This rule warns in the 🌐 all config.
🔧 This rule is automatically fixable by the --fix CLI option.
Examples of incorrect code for this rule:
test('foo', () => {
const mock = vi.fn()
mock('foo')
expect(mock).toHaveBeenCalledOnce()
expect(mock).toHaveBeenCalledWith('foo')
})test('foo', () => {
const mock = vi.fn()
mock('foo')
expect(mock).toHaveBeenCalledExactlyOnceWith('foo')
})