Skip to main content

Function: createRenderedTestEngine()

createRenderedTestEngine<T>(rootElement, partDefinitions, _option?): TestEngine<T>

Defined in: react-legacy/src/createTestEngine.ts:66

Create test engine for React 17 or before, for React 18 or later, use @atomic-testing/react-18 or @atomic-testing/react-19 This function takes an html element purportedly rendered by React and create a test engine for it, it can be useful in environment such as Storybook where Storybook renders the component and the test

Type Parameters​

T​

T extends ScenePart

Parameters​

rootElement​

HTMLElement

The React node to render

partDefinitions​

T

The scene part definitions

_option?​

Readonly<Partial<IReactTestEngineOption>>

Returns​

TestEngine<T>

The test engine