Added post list tests for blog profile page

This commit is contained in:
Corbin Crutchley
2019-08-23 20:54:01 -07:00
parent ff92b7272a
commit b5141772f6
3 changed files with 48 additions and 3 deletions

View File

@@ -0,0 +1,15 @@
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
}
});