Last active
April 12, 2016 20:50
-
-
Save benbayard/a2c120b8da0b1df98887be67119495d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ReactTest, { | |
DescribeReactComponent, | |
WhenTheComponentIsMounted, | |
TheComponentsStateDoesNotExist, | |
TheComponentsStateDoesNotExist, | |
TheComponentHasElement, | |
WhenTheComponentIsClicked, | |
TheComponentHasStateLike, | |
TheComponentHasText | |
} from "react-test"; // to be named of course. | |
// react component | |
const TestSuite = () => (<DescribeReactComponent componentClass={MyComponent}> // or even a Higher order component <DescribeMyComponent /> | |
<WhenTheComponentIsMounted> | |
<TheComponentsStateDoesNotExist /> | |
<TheComponentHasElement type="div" length="3" /> | |
</WhenTheComponentIsMounted> | |
<WhenTheComponentIsClicked> | |
<TheComponentHasStateLike>{state, goes, here}</TheComponentHasStateLike> | |
<TheComponentHasElement type="div" index="3"> | |
<TheComponentHasText>Potato</TheComponentHasText> | |
</TheComponentHasElement> | |
</WhenTheComponentIsClicked> | |
</DescribeReactComponent>); | |
ReactTest.render(TestSuite); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment