1
0
Fork 0
mirror of synced 2024-09-08 05:31:47 +12:00
budibase/packages/backend-core/tests/utilities/jestUtils.ts
2023-02-28 14:54:34 +01:00

9 lines
215 B
TypeScript

export function expectFunctionWasCalledTimesWith(
jestFunction: any,
times: number,
argument: any
) {
expect(
jestFunction.mock.calls.filter((call: any) => call[0] === argument).length
).toBe(times)
}