mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-09-13 19:50:24 +02:00
refactor(starter): upgrade and move to typescript
This commit is contained in:
@@ -11,13 +11,6 @@ const mockedStaticQuery = StaticQuery as jest.Mock;
|
||||
const mockedUseStaticQuery = useStaticQuery as jest.Mock;
|
||||
|
||||
describe("CategoryTemplate", () => {
|
||||
const props = {
|
||||
data: {
|
||||
...mocks.allMarkdownRemark,
|
||||
},
|
||||
...mocks.pageContext,
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
mockedStaticQuery.mockImplementationOnce(({ render }) =>
|
||||
render(mocks.siteMetadata),
|
||||
@@ -26,6 +19,13 @@ describe("CategoryTemplate", () => {
|
||||
});
|
||||
|
||||
it("renders correctly", () => {
|
||||
const props = {
|
||||
data: {
|
||||
allMarkdownRemark: mocks.allMarkdownRemark,
|
||||
},
|
||||
pageContext: mocks.pageContext,
|
||||
};
|
||||
|
||||
const tree = renderer.create(<CategoryTemplate {...props} />).toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
|
Reference in New Issue
Block a user