mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-23 22:27:34 -05:00
23 lines
683 B
JavaScript
23 lines
683 B
JavaScript
/**
|
|
* ModuleContentPlaceholder component
|
|
*/
|
|
|
|
import React from 'react';
|
|
import { shallow } from 'enzyme';
|
|
import ModuleContentPlaceholder from '../../../../src/webui/src/components/PackageSidebar/ModuleContentPlaceholder';
|
|
|
|
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();
|
|
});
|
|
});
|