-
Notifications
You must be signed in to change notification settings - Fork 258
Commit
Signed-off-by: Adam Setch <adam.setch@outlook.com>
- Loading branch information
There are no files selected for viewing
This file was deleted.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,12 @@ | ||
import { render } from '@testing-library/react'; | ||
import { Errors } from '../../utils/constants'; | ||
import { Emoji, type IEmoji } from './Emoji'; | ||
|
||
describe('components/icons/Emoji.tsx', () => { | ||
it('should render - online CDN SVGs', () => { | ||
it('should render', () => { | ||
const props: IEmoji = { | ||
emoji: '🍺', | ||
}; | ||
const tree = render(<Emoji {...props} />); | ||
expect(tree).toMatchSnapshot(); | ||
}); | ||
|
||
it('should render - offline SVGs', () => { | ||
const offlineEmojis = Errors.NETWORK.emojis; | ||
|
||
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 | ||
}); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.