Bring back the test

This commit is contained in:
Sofiya Tepikin
2022-09-18 15:25:51 +02:00
parent 195c792837
commit 2669738c9d
2 changed files with 46 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
import React from 'react'
import { render, screen } from '@testing-library/react-native'
import License from '../components/settings/License'
jest.mock('react-i18next', () => ({
useTranslation: () => ({
t: (str, options) => {
return str + (options ? JSON.stringify(options) : '')
},
}),
}))
describe('License screen', () => {
test('It should have a correct year', async () => {
render(<License setLicense={() => {}} />)
const year = new Date().getFullYear().toString()
screen.getByText(year, { exact: false })
})
})