MCPcopy Create free account
hub / github.com/testing-library/user-event / method

Function method

src/setup/setup.ts:130–139  ·  view source on GitHub ↗
(...args: Args)

Source from the content-addressed store, hash-verified

128 Impl extends (this: Instance, ...args: Args) => Promise<unknown>,
129>(instance: Instance, impl: Impl) {
130 function method(...args: Args) {
131 setLevelRef(instance, ApiLevel.Call)
132
133 return wrapAsync(() =>
134 impl.apply(instance, args).then(async ret => {
135 await wait(instance.config)
136 return ret
137 }),
138 )
139 }
140 Object.defineProperty(method, 'name', {get: () => impl.name})
141
142 return method

Callers

nothing calls this directly

Calls 3

setLevelRefFunction · 0.90
wrapAsyncFunction · 0.90
waitFunction · 0.90

Tested by

no test coverage detected