mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-13 03:35:52 +01:00
24 lines
698 B
JavaScript
24 lines
698 B
JavaScript
/**
|
|
* ModuleContentPlaceholder component
|
|
*/
|
|
|
|
import React from 'react';
|
|
import { shallow } from 'enzyme';
|
|
import ModuleContentPlaceholder from '../../../../../src/webui/components/PackageSidebar/ModuleContentPlaceholder/index';
|
|
|
|
console.error = jest.fn();
|
|
|
|
describe('<PackageSidebar /> : <ModuleContentPlaceholder />', () => {
|
|
test('should error for required props', () => {
|
|
shallow(<ModuleContentPlaceholder />);
|
|
expect(console.error).toHaveBeenCalled();
|
|
});
|
|
test('should load module component', () => {
|
|
const props = {
|
|
text: 'Test text'
|
|
};
|
|
const wrapper = shallow(<ModuleContentPlaceholder {...props} />);
|
|
expect(wrapper.html()).toMatchSnapshot();
|
|
});
|
|
});
|