mirror of
https://github.com/kremalicious/portfolio.git
synced 2024-12-22 17:23:22 +01:00
17 lines
569 B
JavaScript
17 lines
569 B
JavaScript
import React from 'react'
|
|
import { render } from '@testing-library/react'
|
|
import { createHistory, createMemorySource } from '@reach/router'
|
|
import Project from '../src/pages/{ProjectsYaml.slug}'
|
|
import project from './__fixtures__/project.json'
|
|
|
|
describe('Project', () => {
|
|
const history = createHistory(createMemorySource('/oceanprotocol'))
|
|
|
|
it('renders correctly from data file values', async () => {
|
|
const { container } = render(
|
|
<Project data={project} location={history.location} />
|
|
)
|
|
expect(container.firstChild).toBeInTheDocument()
|
|
})
|
|
})
|