UNPKG

@amsterdam/bmi-dms-upload

Version:

A document upload flow that can be implemented in any BMI React application. Documents are stored in DMS. Metadata can be added in the flow.

11 lines (8 loc) 370 B
// overloaded function for using `mocked(`..`)` with any kind of function export function mocked<T extends unknown, V extends unknown[]>(item: (...args: V) => T): jest.Mock<T, V>; export function mocked<T>(item: T): jest.Mock { if (!jest.isMockFunction(item)) { throw new Error('Argument provided to `mocked(`..`)` is not a Jest mock function'); } return item; }