Unit testing React components without a DOM

added by bpwndaddy
6/16/2015 3:49:51 PM

2 Kicks, 516 Views

nstead of rendering into a DOM the idea of shallow rendering is to instantiate a component and get the result of its render method, which is a ReactElement. From here you can do things like check its props and children and verify it works as expected. As you can imagine this is much faster (and less hassle) and will be the recommended way to test components in the future.


0 comments