Created
December 19, 2019 14:10
-
-
Save taverasmisael/b46cf2bbf0f55fb583cb506eab4f3404 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 {render, simulate} from 'test-library-for-react' | |
import Component from './Component' | |
describe ('my obscure test', () => { | |
// This test does not add any value even though it passes | |
// and probably meet the code coverage requirement. | |
it ('should work', () => { | |
const component = render(<Component />) | |
simulate.click(component.find('button')) | |
// Waaat! No idea what the click was supposed to do | |
// Or how he reacted. We must always choose | |
// readability above comfort. | |
expect(component).toMatchSnapshot () | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment