Files
unicorn-utterances/__mocks__/modules/gatsby-plugin-google-analytics.js
2019-08-23 20:54:01 -07:00

16 lines
337 B
JavaScript

import React from 'react'
import {onLinkClick} from 'gatsby-plugin-google-analytics';
afterEach(() => {
onLinkClick.mockReset();
})
jest.mock('gatsby-plugin-google-analytics', () => {
const onLinkClick = jest.fn();
return {
OutboundLink: (props) => <div onClick={onLinkClick}>{props.children}</div>,
onLinkClick
}
});