Chore/extend license test

This commit is contained in:
Sofiya Tepikin
2022-09-19 10:54:33 +00:00
parent 0bba7afc6f
commit d58c230eda
3 changed files with 130 additions and 1 deletions
+8 -1
View File
@@ -12,8 +12,15 @@ jest.mock('react-i18next', () => ({
describe('License screen', () => {
test('It should have a correct year', async () => {
render(<License setLicense={() => {}} />)
render(<License />)
const year = new Date().getFullYear().toString()
screen.getByText(year, { exact: false })
})
test('It should match the snapshot', async () => {
const licenseScreen = render(<License />)
expect(licenseScreen).toMatchSnapshot()
})
})