Skip to content

Commit

Permalink
test: add more If tests
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed Apr 15, 2022
1 parent e6c809a commit 6a91441
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/If.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -414,4 +414,18 @@ describe('<If /> component', () => {
});
});
});

describe('Without Children', () => {
test('GIVEN truthy case THEN renders no children', () => {
render(<If condition={true}></If>);

// No expects required here, this is just a quick render check
});

test('GIVEN promisified case THEN renders no children', () => {
render(<If condition={Promise.resolve(true)}></If>);

// No expects required here, this is just a quick render check
});
});
});

0 comments on commit 6a91441

Please sign in to comment.