mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-07-26 04:04:27 +02:00
chore: update mocks, move configs to jest dir
This commit is contained in:
3
jest/__mocks__/fileMock.js
Normal file
3
jest/__mocks__/fileMock.js
Normal file
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = 'file';
|
29
jest/__mocks__/gatsby.js
Normal file
29
jest/__mocks__/gatsby.js
Normal file
@@ -0,0 +1,29 @@
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const gatsby = jest.requireActual('gatsby');
|
||||
|
||||
module.exports = {
|
||||
...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