README
Table of contents
Overview
A collection of test renderers for react
Installation
This package is usually installed as part of the @component-controls package, but you can also install it standalone:
$ npm install @component-controls/test-renderers --save-dev
API
reactRunDOM
run some function in the dom, by using react-dom
reactRunDOM source code
renderDocument
returns an array of the rendered all stories(examples) imports from a document using a test framework.
renderDocument source code
renderExample
render an example using a test framework.
renderExample source code
properties
Name | Type | Description |
---|---|---|
example* |
Example<Props> | |
doc* |
{ [key: string]: any; title: string; type?: string; route?: string; date?: Date; dateModified?: Date; draft?: boolean; tags?: string[]; keywords?: string[]; description?: string | Element; ... 12 more ...; parameters?: any; } & StoryProps<...> & PageLayoutProps | |
config* |
string | RunConfiguration | |
controls |
ExampleControls |