add some unit tests
pretify episodepage
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
.maincontent {
|
||||
float: left;
|
||||
width: 70%;
|
||||
flex: 1;
|
||||
}
|
||||
|
@@ -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);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user