MCPcopy
hub / github.com/Hashnode/mern-starter / nodeWithIntlProp

Function nodeWithIntlProp

client/util/react-intl-test-helper.js:22–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20 * When using React-Intl `injectIntl` on components, props.intl is required.
21 */
22const nodeWithIntlProp = node => {
23 return React.cloneElement(node, { intl });
24};
25
26export const shallowWithIntl = node => {
27 return shallow(nodeWithIntlProp(node), { context: { intl } });

Callers 2

shallowWithIntlFunction · 0.85
mountWithIntlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected