1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2025-01-05 03:15:00 +01:00
portfolio/tests/Project.test.jsx

17 lines
590 B
React
Raw Normal View History

2019-11-25 13:46:44 +01:00
import React from 'react'
2022-11-05 20:16:56 +01:00
import { render, screen } from '@testing-library/react'
2019-11-25 13:46:44 +01:00
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 () => {
2022-11-05 20:16:56 +01:00
render(<Project data={project} location={history.location} />)
const item = await screen.findByText('Ocean Protocol v1')
expect(item).toBeInTheDocument()
2019-11-25 13:46:44 +01:00
})
})