2019-05-30 22:55:12 +02:00
|
|
|
import { render } from '@testing-library/react'
|
2022-11-16 00:14:59 +01:00
|
|
|
import LogoUnit from '.'
|
2024-02-01 19:59:51 +01:00
|
|
|
import meta from '../../../_content/meta.json'
|
2019-04-15 00:25:54 +02:00
|
|
|
|
|
|
|
describe('LogoUnit', () => {
|
|
|
|
it('renders correctly from data file values', () => {
|
2019-06-10 23:06:55 +02:00
|
|
|
const { container } = render(<LogoUnit />)
|
2019-04-15 00:25:54 +02:00
|
|
|
|
|
|
|
expect(container.firstChild).toBeInTheDocument()
|
2019-06-10 23:06:55 +02:00
|
|
|
expect(container.querySelector('.title')).toHaveTextContent(
|
2024-02-01 19:59:51 +01:00
|
|
|
meta.author.name.toLowerCase()
|
2019-06-10 23:06:55 +02:00
|
|
|
)
|
|
|
|
expect(container.querySelector('.description')).toHaveTextContent(
|
2024-02-01 19:59:51 +01:00
|
|
|
meta.author.label.toLowerCase()
|
2019-06-10 23:06:55 +02:00
|
|
|
)
|
2019-04-15 00:25:54 +02:00
|
|
|
})
|
|
|
|
|
2022-11-16 00:14:59 +01:00
|
|
|
it('renders in small variant', () => {
|
|
|
|
const { container } = render(<LogoUnit small />)
|
2019-04-15 00:25:54 +02:00
|
|
|
|
|
|
|
expect(container.firstChild).toBeInTheDocument()
|
2022-11-16 00:14:59 +01:00
|
|
|
expect(container.querySelector('.small')).toBeInTheDocument()
|
2019-04-15 00:25:54 +02:00
|
|
|
})
|
|
|
|
})
|