MCPcopy
hub / github.com/adobe/react-spectrum / renderHook

Function renderHook

packages/dev/test-utils/src/renderOverride.tsx:40–41  ·  view source on GitHub ↗
(render, options)

Source from the content-addressed store, hash-verified

38// export renderHook and actHook from testing-library/react-hooks library if they don't exist in @testing-library/react
39// (i.e. renderHook is only in v13+ of testing library)
40export let renderHook: typeof originalRenderHook = (render, options) =>
41 reactTestingLibrary.renderHook(render, {wrapper: StrictModeWrapper, ...options});
42export let actHook = reactTestingLibrary.act as typeof originalAct;
43if (!reactTestingLibrary.renderHook) {
44 let rhtl = require('@testing-library/react-hooks');

Callers 15

renderProgressBarHookFunction · 0.85
renderLinkHookFunction · 0.85
renderSearchHookFunction · 0.85
renderLinkHookFunction · 0.85
renderLinkHookFunction · 0.85
renderNumberFieldHookFunction · 0.85
renderActionGroupHookFunction · 0.85
renderFieldHookFunction · 0.85
renderLabelHookFunction · 0.85

Calls

no outgoing calls

Tested by 14

renderProgressBarHookFunction · 0.68
renderLinkHookFunction · 0.68
renderSearchHookFunction · 0.68
renderLinkHookFunction · 0.68
renderLinkHookFunction · 0.68
renderNumberFieldHookFunction · 0.68
renderActionGroupHookFunction · 0.68
renderFieldHookFunction · 0.68
renderLabelHookFunction · 0.68
renderMenuTriggerHookFunction · 0.68
renderUseSliderFunction · 0.68
renderColorFieldHookFunction · 0.68