Last active
July 3, 2020 14:26
-
-
Save marcoemrich/2b5cf36f83469210c7dbf63c40b26af3 to your computer and use it in GitHub Desktop.
JS-Testing: Testing Library testid example
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
it('should have the right number of cells', () => { | |
const { container, getAllByTestId } = render(<Board game={TicTacToe.startWithSize(4, 4)} />); | |
expect( | |
getAllByTestId("cell").length | |
).toEqual(16); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment