Files
unicorn-utterances/__mocks__/modules/gatsby-plugin-google-analytics.tsx
2020-02-27 21:41:04 -08:00

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
};
});