MCPcopy Create free account
hub / github.com/webdriverio/webdriverio / transformPropertyWithMockFunction

Function transformPropertyWithMockFunction

__mocks__/fetch.ts:35–44  ·  view source on GitHub ↗
(collection: any[])

Source from the content-addressed store, hash-verified

33 * @returns A new array with updated objects.
34 */
35const 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
46const requestMock: any = vi.fn().mockImplementation((uri, params) => {
47 let value: any = {}

Callers 1

fetch.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…