mirror of
https://github.com/kremalicious/portfolio.git
synced 2024-11-15 01:25:25 +01:00
22 lines
620 B
JavaScript
22 lines
620 B
JavaScript
import '@testing-library/jest-dom/extend-expect'
|
|
import 'jest-canvas-mock'
|
|
import { StaticQuery, useStaticQuery } from 'gatsby'
|
|
import { getSrc } from 'gatsby-plugin-image'
|
|
|
|
import meta from './__fixtures__/meta.json'
|
|
import resume from './__fixtures__/resume.json'
|
|
import projects from './__fixtures__/projects.json'
|
|
|
|
beforeAll(() => {
|
|
const photoSrc = getSrc(resume.contentJson.basics.picture)
|
|
const dataMock = {
|
|
...meta,
|
|
...resume,
|
|
photoSrc,
|
|
...projects
|
|
}
|
|
|
|
StaticQuery.mockImplementation(({ render }) => render({ ...dataMock }))
|
|
useStaticQuery.mockImplementation(() => ({ ...dataMock }))
|
|
})
|