mirror of
https://github.com/kremalicious/blog.git
synced 2024-11-15 09:35:21 +01:00
29 lines
575 B
JavaScript
29 lines
575 B
JavaScript
|
const React = require('react')
|
||
|
const gatsby = jest.requireActual('gatsby')
|
||
|
|
||
|
module.exports = {
|
||
|
...gatsby,
|
||
|
graphql: jest.fn(),
|
||
|
Link: jest.fn().mockImplementation(
|
||
|
// these props are invalid for an `a` tag
|
||
|
({
|
||
|
/* eslint-disable no-unused-vars */
|
||
|
activeClassName,
|
||
|
activeStyle,
|
||
|
getProps,
|
||
|
innerRef,
|
||
|
ref,
|
||
|
replace,
|
||
|
to,
|
||
|
/* eslint-enable no-unused-vars */
|
||
|
...rest
|
||
|
}) =>
|
||
|
React.createElement('a', {
|
||
|
...rest,
|
||
|
href: to
|
||
|
})
|
||
|
),
|
||
|
StaticQuery: jest.fn(),
|
||
|
useStaticQuery: jest.fn()
|
||
|
}
|