2019-11-25 13:46:44 +01:00
|
|
|
import React from 'react'
|
|
|
|
import { render } from '@testing-library/react'
|
|
|
|
import { createHistory, createMemorySource } from '@reach/router'
|
2021-02-06 14:40:39 +01:00
|
|
|
import Project from '../src/pages/{ProjectsYaml.slug}'
|
|
|
|
import project from './__fixtures__/project.json'
|
2019-11-25 13:46:44 +01:00
|
|
|
|
|
|
|
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()
|
|
|
|
})
|
|
|
|
})
|