Skip to content

Instantly share code, notes, and snippets.

@marcoemrich
Last active July 3, 2020 14:26
Show Gist options
  • Save marcoemrich/a73ca66af567a58e765a98996fc1d1bc to your computer and use it in GitHub Desktop.
Save marcoemrich/a73ca66af567a58e765a98996fc1d1bc to your computer and use it in GitHub Desktop.
JS-Testing: Enzyme shallow rendering example
describe('Board', () => {
it('should have the right number of cells', () => {
const wrapper = shallow(<Board game={TicTacToe.startWithSize(4, 4)} />);
expect(wrapper.find(Cell).length).toEqual(16);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment