Skip to content

Commit

Permalink
Added coverage test for react-native loading component (#1024)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuket15 committed Oct 24, 2021
1 parent f5bdcef commit 871a3d6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/client/react-native.test.js
Expand Up @@ -36,6 +36,24 @@ test('board is rendered', () => {
game.unmount();
});

test('board is rendered with custom loading', () => {
const Loading = () => <></>;

const Board = Client({
game: {},
board: TestBoard,
loading: Loading,
});

const game = Enzyme.mount(<Board />);
const board = game.find(TestBoard);

expect(board.props().isActive).toBe(true);
expect(board.text()).toBe('Board');

game.unmount();
});

test('board props', () => {
const Board = Client({
game: {},
Expand Down

0 comments on commit 871a3d6

Please sign in to comment.