mirror of
https://github.com/LukeHagar/unicorn-utterances.git
synced 2025-12-10 04:22:06 +00:00
18 lines
348 B
TypeScript
18 lines
348 B
TypeScript
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: any) => (
|
|
<div onClick={onLinkClick}>{props.children}</div>
|
|
),
|
|
onLinkClick
|
|
};
|
|
});
|