mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
23 lines
512 B
JavaScript
23 lines
512 B
JavaScript
/* eslint-env jest */
|
|
|
|
import React from 'react'
|
|
import { render } from 'react-testing-library'
|
|
|
|
import App from '../pages/index.js'
|
|
|
|
describe('With React Testing Library', () => {
|
|
it('Shows "Hello world!"', () => {
|
|
const { getByText } = render(<App />)
|
|
|
|
expect(getByText('Hello World!')).not.toBeNull()
|
|
})
|
|
})
|
|
|
|
describe('With React Testing Library Snapshot', () => {
|
|
it('Should match Snapshot', () => {
|
|
const { asFragment } = render(<App />)
|
|
|
|
expect(asFragment()).toMatchSnapshot()
|
|
})
|
|
})
|