mirror of
https://github.com/LukeHagar/unicorn-utterances.git
synced 2025-12-06 04:21:55 +00:00
20 lines
393 B
TypeScript
20 lines
393 B
TypeScript
import { onLinkClick } from "gatsby-plugin-google-analytics";
|
|
|
|
afterEach(() => {
|
|
onLinkClick.mockReset();
|
|
});
|
|
|
|
jest.mock("gatsby-plugin-google-analytics", () => {
|
|
const React = require("react");
|
|
const onLinkClickFn = jest.fn();
|
|
|
|
return {
|
|
OutboundLink: (props: any) => (
|
|
<div onClick={onLinkClickFn}>{props.children}</div>
|
|
),
|
|
onLinkClick: onLinkClickFn
|
|
};
|
|
});
|
|
|
|
export default {};
|