forked from sombochea/verdaccio-ui
chore: sync with verdaccio master
This commit is contained in:
24
test/unit/webui/components/noitems.spec.js
Normal file
24
test/unit/webui/components/noitems.spec.js
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* NoItems component
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { shallow, mount } from 'enzyme';
|
||||
import NoItems from '../../../../src/webui/components/NoItems/index';
|
||||
|
||||
console.error = jest.fn();
|
||||
|
||||
describe('<NoItem /> component', () => {
|
||||
test('should load the component in default state', () => {
|
||||
const wrapper = shallow(<NoItems />);
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('should set html from props', () => {
|
||||
const props = {
|
||||
text: 'This is a test string'
|
||||
};
|
||||
const wrapper = mount(<NoItems {...props} />);
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user