BOD-58 WIP For testing classes. No success.

This commit is contained in:
Patrick Fic
2020-03-24 11:27:30 -07:00
parent 7d33484294
commit c095ba68eb
15 changed files with 376 additions and 97 deletions

View File

@@ -6,8 +6,18 @@ import { shallow, mount } from "enzyme";
const div = document.createElement("div");
it("renders without crashing", () => {
const wrapper = mount(<Alert type="error" message="Test Error" />);
console.log("wrapper", wrapper);
// expect(wrapper.children()).to.have.lengthOf(1);
describe("Alert component", () => {
let wrapper;
beforeEach(() => {
const mockProps = {
type: "error",
message: "Test error message."
};
wrapper = shallow(<Alert {...mockProps} />);
});
it("should render Alert component", () => {
expect(wrapper).toMatchSnapshot();
});
});