Skip to content

Instantly share code, notes, and snippets.

@FagnerMartinsBrack
Created December 17, 2018 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FagnerMartinsBrack/dc5dca24f08c5692f7990705c9c668a8 to your computer and use it in GitHub Desktop.
Save FagnerMartinsBrack/dc5dca24f08c5692f7990705c9c668a8 to your computer and use it in GitHub Desktop.
(Medium) - The Myth Of 100% Code Coverage
const renderedComponent = render(<Counter></Counter>);
renderedComponent.querySelector('.count-button').click();
renderedComponent.querySelector('.count-button').click();
const renderedCount = renderedComponent
.querySelector('.current-count')
.innerHTML;
expect(renderedCount).toEqual('2');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment