mirror of
https://github.com/kremalicious/portfolio.git
synced 2024-06-14 00:13:23 +02:00
23 lines
609 B
TypeScript
23 lines
609 B
TypeScript
import { act, render } from '@testing-library/react'
|
|
import Meta from '.'
|
|
|
|
describe('Meta', () => {
|
|
it('renders without crashing', async () => {
|
|
await act(async () => {
|
|
render(<Meta title="Hello World" description="Hello" />, {
|
|
container: document.head
|
|
})
|
|
})
|
|
expect(document.title).toBe('Hello World')
|
|
})
|
|
|
|
it('renders without crashing with slug', async () => {
|
|
await act(async () => {
|
|
render(<Meta title="Hello World" description="Hello" slug="hello" />, {
|
|
container: document.head
|
|
})
|
|
})
|
|
expect(document.title).toBe('Hello World')
|
|
})
|
|
})
|