react-component-tester
Advanced tools
Comparing version 0.0.7 to 0.0.8
{ | ||
"name": "react-component-tester", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "A simple helper to make testing react components with shallow rendering easier", | ||
@@ -23,3 +23,10 @@ "main": "index.js", | ||
"shallow", | ||
"rendering" | ||
"rendering", | ||
"react-test", | ||
"react-testing", | ||
"react-tester", | ||
"react-component", | ||
"react-shallow-rendering", | ||
"react-test-help", | ||
"react-testing-helpers" | ||
], | ||
@@ -26,0 +33,0 @@ "author": "Craig Bilner", |
@@ -42,3 +42,3 @@ # react component tester | ||
### countComponents | ||
### .countComponents(Component{ReactComponent}) => count{int} | ||
@@ -56,3 +56,3 @@ takes a react component and returns the number of times it appears in the rendered tree for the component under test | ||
### findChild | ||
### .findChild(path{string}) => child{ReactComponent} | ||
@@ -69,3 +69,3 @@ takes a zero based decimal delimited string path and returns the resulting rendered component. this will make your tests more brittle to DOM changes but can come in handy | ||
### findComponents | ||
### .findComponents(Component{ReactComponent}) => [Component{ReactComponent}] | ||
@@ -82,3 +82,3 @@ takes a react component and returns an array of all child rendered components of that type | ||
### getState | ||
### .getState() => state{object} | ||
@@ -96,3 +96,3 @@ returns the current state of the given component flavour. resetState should be run after each test to ensure tests do not collide | ||
### propFunc, mapsTo | ||
### .propFunc(propName{string}), .mapsTo(methodName{string}) => isMapped{boolean} | ||
@@ -115,3 +115,3 @@ propFunc takes a string which is the prop of a dumb component to which you are passing a function | ||
### resetState | ||
### .resetState() | ||
@@ -122,20 +122,20 @@ returns the state of the flavour of the component under test to the initial state | ||
### component | ||
### component{renderedReactComponent} | ||
the rendered component that is under test | ||
### props | ||
### props{object} | ||
the props of the rendered component will be returned for each component found | ||
### style | ||
### style{object} | ||
for ease of use, the style prop is placed on each component too | ||
### type | ||
### type{componentType} | ||
each returned component will have a type | ||
### value | ||
### value{string} | ||
if a component doesn't have any children, it's content will be added as the value property |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42952