Last active
May 11, 2017 16:20
-
-
Save pho3nixf1re/4c23d77709ce4ef044ebae7c937940ec to your computer and use it in GitHub Desktop.
1) Run the test `ava ava-snapshot-split-error.js`. 2) Change 'change me' to something else. 3) Re-run the test to throw the error `TypeError: Cannot read property 'split' of null`.
This file contains 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 React from 'react'; | |
import test from 'ava'; | |
import { render } from 'enzyme'; | |
const TestMe = ({ me }) => ( | |
<div> | |
<p>{me}</p> | |
</div> | |
); | |
test('renders the component', t => { | |
const wrapper = render(<TestMe me='change me' />); | |
t.snapshot(wrapper.html()); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment