BOD-58 WIP For testing classes. No success.
This commit is contained in:
@@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user