mirror of
https://github.com/kremalicious/portfolio.git
synced 2024-11-15 01:25:25 +01:00
27 lines
649 B
JavaScript
27 lines
649 B
JavaScript
import React from 'react'
|
|
import { render } from '@testing-library/react'
|
|
import Home from '../src/pages/index'
|
|
import projects from './__fixtures__/projects.json'
|
|
import projectImageFiles from './__fixtures__/projectImageFiles.json'
|
|
|
|
describe('Home', () => {
|
|
const data = {
|
|
...projects,
|
|
...projectImageFiles
|
|
}
|
|
|
|
const pageContext = {
|
|
repos: [
|
|
{
|
|
name: 'hello',
|
|
full_name: 'kremalicious/hello'
|
|
}
|
|
]
|
|
}
|
|
|
|
it('renders correctly from data file values', () => {
|
|
const { container } = render(<Home data={data} pageContext={pageContext} />)
|
|
expect(container.firstChild).toBeInTheDocument()
|
|
})
|
|
})
|