0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-13 22:48:31 -05:00
verdaccio/test/unit/webui/components/PackageSidebar/moduleContentPlaceholder.spec.js

24 lines
688 B
JavaScript
Raw Normal View History

2017-12-20 09:40:53 +05:30
/**
* ModuleContentPlaceholder component
*/
import React from 'react';
import { shallow } from 'enzyme';
import ModuleContentPlaceholder from '../../../../../src/webui/components/PackageSidebar/ModuleContentPlaceholder/index';
2017-12-20 09:40:53 +05:30
console.error = jest.fn();
describe('<PackageSidebar /> : <ModuleContentPlaceholder />', () => {
it('should error for required props', () => {
shallow(<ModuleContentPlaceholder />);
expect(console.error).toBeCalled();
});
it('should load module component', () => {
const props = {
text: 'Test text'
};
const wrapper = shallow(<ModuleContentPlaceholder {...props} />);
expect(wrapper.html()).toMatchSnapshot();
});
});