Skip to content

Commit

Permalink
increase coverage
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Setch <adam.setch@outlook.com>
  • Loading branch information
setchy committed Aug 9, 2024
1 parent 83cfac9 commit 0659fe3
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/components/icons/Emoji.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ describe('components/icons/Emoji.tsx', () => {
it('should render - offline SVGs', () => {
const offlineEmojis = Errors.NETWORK.emojis;

// Check that all NETWORK error emojis are configured for offline use
for (const emoji of offlineEmojis) {
const tree = render(<Emoji emoji={emoji} />);
expect(tree.baseElement.innerHTML).not.toContain('https://'); // Offline emojis should not have an online URL
expect(tree).toMatchSnapshot();
}
const tree = render(<Emoji emoji={offlineEmojis[0]} />);

expect(tree.baseElement.innerHTML).not.toContain('https://'); // Offline emojis should not have an online URL
expect(offlineEmojis.length).toEqual(1); // Ensure all NETWORK error emojis are configured for offline use - future proofing
expect(tree).toMatchSnapshot();
});
});

0 comments on commit 0659fe3

Please sign in to comment.