0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-06 22:40:26 -05:00
verdaccio/test/webui/components/noitems.spec.js
Ayush Sharma e03672b70b Chore: typo and spacing fixes
test name fixes
2018-01-07 07:59:36 +00:00

24 lines
598 B
JavaScript

/**
* NoItems component
*/
import React from 'react';
import { shallow } from 'enzyme';
import NoItems from '../../../src/webui/src/components/NoItems';
console.error = jest.fn();
describe('<NoItem /> component', () => {
it('should give error for the required fields', () => {
shallow(<NoItems />);
expect(console.error).toBeCalled();
});
it('should set html from props', () => {
const props = {
text: 'This is a test string'
};
const wrapper = shallow(<NoItems {...props} />);
expect(wrapper.find('h2').text()).toEqual('This is a test string');
});
});