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

Function eventWrapper

src/utils/misc/eventWrapper.ts:3–9  ·  view source on GitHub ↗
(cb: () => T)

Source from the content-addressed store, hash-verified

1import {getConfig} from '@testing-library/dom'
2
3export function eventWrapper<T>(cb: () => T): T | undefined {
4 let result
5 getConfig().eventWrapper(() => {
6 result = cb()
7 })
8 return result
9}

Callers 3

pasteFunction · 0.90
focusFunction · 0.90
blurFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected