1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2024-06-10 19:31:03 +02:00
portfolio/src/components/Meta/index.test.tsx
Matthias Kretschmann 447cada700
Migrate to Next.js + TypeScript (#1038)
* next.js + typescript

* more testing

* script updates

* fixes

* favicon generation

* testing

* readme updates

* tweaks

* tweaks

* move tests

* image tweaks

* ci tweaks

* commit next-env.d.ts for ci

* migrations

* fixes

* fixes

* ci tweaks

* new animations

* project preview tweaks

* add codeclimate config

* dark mode refactor, test tweaks

* readme updates

* animation tweaks

* animate in loaded images

* test update

* update humans.txt
2022-11-15 23:14:59 +00:00

24 lines
595 B
TypeScript

import React from 'react'
import { render, act } from '@testing-library/react'
import Meta from '.'
describe('Meta', () => {
it('renders without crashing', async () => {
await act(async () => {
render(<Meta title="Hello World" />, {
container: document.head
})
})
expect(document.title).toBe('Hello World')
})
it('renders without crashing with slug', async () => {
await act(async () => {
render(<Meta title="Hello World" slug="hello" />, {
container: document.head
})
})
expect(document.title).toBe('Hello World')
})
})