Hi Harmon, Thanks for the such a good explanation. I followed your process to enable my App with jest and enzyme. But after running yarn test, all generated spapshot files are empty. They are only having following data:
import React from "react";
import App from "../App";
import { MemoryRouter } from "react-router-dom";
import { I18nextProvider } from "react-i18next";
import i18n from "../../i18n";
import { shallow } from "enzyme";
Hi Harmon, Thanks for the such a good explanation. I followed your process to enable my App with jest and enzyme. But after running yarn test, all generated spapshot files are empty. They are only having following data:
// Jest Snapshot v1, goo.gl/fbAQLP
exports[
App component App rendering: 1
] =ShallowWrapper {}
;===========================
Following is my App.test.tsx file:
import React from "react";
import App from "../App";
import { MemoryRouter } from "react-router-dom";
import { I18nextProvider } from "react-i18next";
import i18n from "../../i18n";
import { shallow } from "enzyme";
describe("App component", () => {
it("App rendering:", () => {
const hostWrapper = shallow(
);
expect(hostWrapper).toMatchSnapshot();
});
});