mirror of
https://github.com/kremalicious/blog.git
synced 2024-11-15 09:35:21 +01:00
15 lines
308 B
TypeScript
15 lines
308 B
TypeScript
import React from 'react'
|
|
const gatsby = jest.requireActual('gatsby')
|
|
|
|
export default {
|
|
...gatsby,
|
|
graphql: jest.fn(),
|
|
Link: jest
|
|
.fn()
|
|
.mockImplementation(({ to, ...rest }) =>
|
|
React.createElement('a', { ...rest, href: to })
|
|
),
|
|
StaticQuery: jest.fn(),
|
|
useStaticQuery: jest.fn()
|
|
}
|