Distinction between License and AcceptLicense screens

This commit is contained in:
Sofiya Tepikin
2022-09-18 13:02:43 +00:00
parent fb863c832b
commit f6a90994b6
6 changed files with 53 additions and 76 deletions
-21
View File
@@ -1,21 +0,0 @@
import React from 'react'
import { render, screen } from '@testing-library/react-native'
import License from '../components/License'
jest.mock('../local-storage', () => ({ saveLicenseFlag: jest.fn() }))
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 })
})
})