18 lines
472 B
JavaScript
Raw Normal View History

2020-06-09 17:49:41 +02:00
import React from "react";
2020-06-09 23:22:43 +02:00
import SideBar from "./SideBar";
2020-06-09 20:10:26 +02:00
2020-06-09 17:49:41 +02:00
import "@testing-library/jest-dom"
import {shallow} from "enzyme";
2020-06-09 17:49:41 +02:00
2020-06-09 23:22:43 +02:00
describe('<SideBar/>', function () {
2020-06-09 20:10:26 +02:00
it('renders without crashing ', function () {
const wrapper = shallow(<SideBar/>);
wrapper.unmount();
2020-06-09 20:10:26 +02:00
});
2020-06-09 17:49:41 +02:00
2020-06-09 20:10:26 +02:00
it('renders childs correctly', function () {
const wrapper = shallow(<SideBar>test</SideBar>);
expect(wrapper.children().text()).toBe("test");
2020-06-09 20:10:26 +02:00
});
2020-06-09 17:49:41 +02:00
});