Chore: add footnote component

This commit is contained in:
Maria Zadnepryanets
2022-09-20 16:43:20 +00:00
parent b4d92d0d7b
commit 3447a0ea1e
5 changed files with 136 additions and 28 deletions
+19
View File
@@ -0,0 +1,19 @@
import React from 'react'
import { render } from '@testing-library/react-native'
import Footnote from '../../../components/common/Footnote'
describe('Footnote component', () => {
test('when children are present, renders them', () => {
const text = 'Some footnote text'
const { toJSON } = render(<Footnote>{text}</Footnote>)
expect(toJSON()).toMatchSnapshot()
})
test('when no children, renders nothing', () => {
const { toJSON } = render(<Footnote></Footnote>)
expect(toJSON()).toMatchSnapshot()
})
})