Created
          November 6, 2021 22:41 
        
      - 
      
- 
        Save szaranger/c909fc4496b6b454b93f4e1007b50254 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
    
  
  
    
  | test('Clicking on + increments the number', () => { | |
| // using React Testing Library | |
| render(<Count />); | |
| expect(screen.getByText('Total')).toBeInTheDocument(); | |
| userEvent.click(screen.getByText('Click')); | |
| expect(screen.queryByText('1')).toBeInTheDocument(); | |
| }); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment