2019-10-11 23:50:03 +02:00
|
|
|
import '@testing-library/jest-dom/extend-expect'
|
2022-11-19 16:09:13 +01:00
|
|
|
import './__mocks__/matchMedia'
|
2019-11-24 14:29:25 +01:00
|
|
|
|
|
|
|
import * as Gatsby from 'gatsby'
|
|
|
|
const useStaticQuery = jest.spyOn(Gatsby, 'useStaticQuery')
|
2022-02-12 14:30:57 +01:00
|
|
|
import meta from './__fixtures__/meta.json'
|
|
|
|
import avatar from './__fixtures__/avatar.json'
|
|
|
|
import posts from './__fixtures__/posts.json'
|
|
|
|
import github from './__fixtures__/github.json'
|
2019-11-24 14:29:25 +01:00
|
|
|
|
|
|
|
beforeAll(() => {
|
|
|
|
useStaticQuery.mockImplementation(() => ({
|
|
|
|
...meta,
|
|
|
|
...avatar,
|
|
|
|
logo: { edges: [{ node: { relativePath: 'apple-touch-icon.png' } }] },
|
|
|
|
...posts,
|
|
|
|
...github
|
|
|
|
}))
|
|
|
|
})
|