1
0
mirror of https://github.com/SomboChea/ui synced 2024-11-16 03:04:27 +07:00
verdaccio-ui/test/unit/components/noitems.spec.js
Juan Picado @jotadeveloper 9d7be476ad chore: relocate unit test (#39)
add new json snapshot serializer
2019-05-01 21:02:46 +02:00

25 lines
606 B
JavaScript

/**
* 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();
});
});