mirror of
https://github.com/kremalicious/blog.git
synced 2024-11-25 03:14:01 +01:00
20 lines
565 B
TypeScript
20 lines
565 B
TypeScript
import '@testing-library/jest-dom/extend-expect'
|
|
import './__mocks__/matchMedia'
|
|
|
|
import * as Gatsby from 'gatsby'
|
|
const useStaticQuery = jest.spyOn(Gatsby, 'useStaticQuery')
|
|
import meta from './__fixtures__/meta.json'
|
|
import avatar from './__fixtures__/avatar.json'
|
|
import posts from './__fixtures__/posts.json'
|
|
import github from './__fixtures__/github.json'
|
|
|
|
beforeAll(() => {
|
|
useStaticQuery.mockImplementation(() => ({
|
|
...meta,
|
|
...avatar,
|
|
logo: { edges: [{ node: { relativePath: 'apple-touch-icon.png' } }] },
|
|
...posts,
|
|
...github
|
|
}))
|
|
})
|