2019-10-11 23:50:03 +02:00
|
|
|
import React from 'react'
|
2019-05-02 21:11:52 +02:00
|
|
|
const gatsby = jest.requireActual('gatsby')
|
|
|
|
|
2019-10-11 23:50:03 +02:00
|
|
|
export default {
|
2019-05-02 21:11:52 +02:00
|
|
|
...gatsby,
|
|
|
|
graphql: jest.fn(),
|
|
|
|
Link: jest.fn().mockImplementation(
|
|
|
|
// these props are invalid for an `a` tag
|
|
|
|
({
|
2019-10-11 23:50:03 +02:00
|
|
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
2019-05-02 21:11:52 +02:00
|
|
|
activeClassName,
|
|
|
|
activeStyle,
|
|
|
|
getProps,
|
|
|
|
innerRef,
|
|
|
|
ref,
|
|
|
|
replace,
|
|
|
|
to,
|
2019-10-11 23:50:03 +02:00
|
|
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
2019-05-02 21:11:52 +02:00
|
|
|
...rest
|
|
|
|
}) =>
|
|
|
|
React.createElement('a', {
|
|
|
|
...rest,
|
|
|
|
href: to
|
|
|
|
})
|
|
|
|
),
|
|
|
|
StaticQuery: jest.fn(),
|
|
|
|
useStaticQuery: jest.fn()
|
|
|
|
}
|