1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2025-05-29 22:37:44 +02:00

test: add the first automated tests

This commit is contained in:
divlo
2021-04-18 23:09:51 +02:00
parent 0922e00cdf
commit 60df0bac5c
9 changed files with 13847 additions and 9464 deletions

View File

@ -1,4 +1,4 @@
import HeadTag from 'next/head'
import NextHead from 'next/head'
interface HeadProps {
title?: string
@ -7,7 +7,7 @@ interface HeadProps {
url?: string
}
const Head: React.FC<HeadProps> = props => {
export const Head: React.FC<HeadProps> = props => {
const {
title = 'Divlo',
image = '/images/icons/icon-96x96.png',
@ -16,7 +16,7 @@ const Head: React.FC<HeadProps> = props => {
} = props
return (
<HeadTag>
<NextHead>
<title>{title}</title>
<link rel='icon' type='image/png' href={image} />
@ -52,8 +52,6 @@ const Head: React.FC<HeadProps> = props => {
<meta name='apple-mobile-web-app-capable' content='yes' />
<meta name='mobile-web-app-capable' content='yes' />
<link rel='apple-touch-icon' href={image} />
</HeadTag>
</NextHead>
)
}
export default Head

View File

@ -0,0 +1,10 @@
import { render } from '@testing-library/react'
import { Button } from '../Button'
describe('<Button />', () => {
it('should render', async () => {
const { getByText } = render(<Button>Submit</Button>)
expect(getByText('Submit')).toBeInTheDocument()
})
})