(collection: any[])
| 33 | * @returns A new array with updated objects. |
| 34 | */ |
| 35 | const transformPropertyWithMockFunction = (collection: any[]) => { |
| 36 | return collection.map(item => { |
| 37 | for (const prop in item) { |
| 38 | if (item[prop] && item[prop] === 'mockFunction') { |
| 39 | item[prop] = vi.fn() |
| 40 | } |
| 41 | } |
| 42 | return item |
| 43 | }) |
| 44 | } |
| 45 | |
| 46 | const requestMock: any = vi.fn().mockImplementation((uri, params) => { |
| 47 | let value: any = {} |
no outgoing calls
no test coverage detected
searching dependent graphs…