MCPcopy Index your code
hub / github.com/callstack/react-native-testing-library / method

Function method

src/user-event/setup/setup.ts:188–196  ·  view source on GitHub ↗
(...args: Args)

Source from the content-addressed store, hash-verified

186 Impl extends (this: UserEventInstance, ...args: Args) => Promise<unknown>,
187>(instance: UserEventInstance, impl: Impl) {
188 function method(...args: Args) {
189 return wrapAsync(() =>
190 // eslint-disable-next-line promise/prefer-await-to-then
191 impl.apply(instance, args).then(async (result) => {
192 await wait(instance.config);
193 return result;
194 }),
195 );
196 }
197
198 // Copy implementation name to the returned function
199 Object.defineProperty(method, 'name', { get: () => impl.name });

Callers

nothing calls this directly

Calls 2

wrapAsyncFunction · 0.90
waitFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…