0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-23 22:27:34 -05:00
verdaccio/test/unit/webui/components/PackageSidebar/moduleContentPlaceholder.spec.js
Juan Picado @jotadeveloper 49c6191bb5
refactor: relocate unit test
no logic change, just path updates
2018-06-23 20:57:12 +02:00

23 lines
692 B
JavaScript

/**
* ModuleContentPlaceholder component
*/
import React from 'react';
import { shallow } from 'enzyme';
import ModuleContentPlaceholder from '../../../../../src/webui/src/components/PackageSidebar/ModuleContentPlaceholder/index';
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();
});
});