Abstract testing function
parent
61201375c1
commit
9aa600035f
|
@ -0,0 +1,7 @@
|
|||
import { expect } from "vitest";
|
||||
|
||||
// eslint-disable-next-line
|
||||
export const expectFunctionToBeCalledNthTimesWithArgs = (fn: Function, n: number, args: any) => {
|
||||
expect(fn).toHaveBeenCalledTimes(n);
|
||||
expect(fn).toHaveBeenCalledWith(args);
|
||||
};
|
Loading…
Reference in New Issue