add some unit tests

pretify episodepage
This commit is contained in:
2021-04-28 17:31:38 +02:00
parent 8c44a931de
commit 4ae9f27902
6 changed files with 126 additions and 24 deletions

View File

@@ -1,4 +1,5 @@
.maincontent {
float: left;
width: 70%;
flex: 1;
}

View File

@@ -27,4 +27,11 @@ describe('<DynamicContentContainer/>', function () {
expect(wrapper.find('a')).toHaveLength(0);
expect(wrapper.find('.maincontent').text()).toBe('no items to show!');
});
it('test clean', function () {
const wrapper = shallow(<DynamicContentContainer data={[{}, {}, {}]} renderElement={(el) => (<a/>)}/>);
expect(wrapper.find('a')).toHaveLength(3);
wrapper.instance().clean();
expect(wrapper.find('a')).toHaveLength(0);
});
});