mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-07-27 12:42:28 +02:00
refactor(starter): upgrade to new version of gatsby
This commit is contained in:
28
internal/testing/__mocks__/gatsby.ts
Normal file
28
internal/testing/__mocks__/gatsby.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import React from "react";
|
||||
|
||||
const gatsby = jest.requireActual("gatsby");
|
||||
|
||||
export default {
|
||||
...gatsby,
|
||||
graphql: jest.fn(),
|
||||
Link: jest
|
||||
.fn()
|
||||
.mockImplementation(
|
||||
({
|
||||
activeClassName,
|
||||
activeStyle,
|
||||
getProps,
|
||||
innerRef,
|
||||
ref,
|
||||
replace,
|
||||
to,
|
||||
...rest
|
||||
}) =>
|
||||
React.createElement("a", {
|
||||
...rest,
|
||||
href: to,
|
||||
}),
|
||||
),
|
||||
StaticQuery: jest.fn(),
|
||||
useStaticQuery: jest.fn(),
|
||||
};
|
Reference in New Issue
Block a user