mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-20 22:52:46 -05:00
refactor: fixes unit tests for <NoItems/> component
This commit is contained in:
parent
1c80c0a0fc
commit
5af6b04b28
2 changed files with 3 additions and 4 deletions
|
@ -2,4 +2,4 @@
|
|||
|
||||
exports[`<NoItem /> component should load the component in default state 1`] = `"<h6 class=\\"MuiTypography-root-1 MuiTypography-subtitle1-19 MuiTypography-gutterBottom-28\\"></h6>"`;
|
||||
|
||||
exports[`<NoItem /> component should set html from props 1`] = `"<div class=\\"css-6ghnff e1ggl3im0\\"><h2>This is a test string</h2></div>"`;
|
||||
exports[`<NoItem /> component should set html from props 1`] = `"<h6 class=\\"MuiTypography-root-1 MuiTypography-subtitle1-19 MuiTypography-gutterBottom-28\\">This is a test string</h6>"`;
|
||||
|
|
|
@ -10,7 +10,7 @@ console.error = jest.fn();
|
|||
|
||||
describe('<NoItem /> component', () => {
|
||||
test('should load the component in default state', () => {
|
||||
const wrapper = mount(<NoItems />);
|
||||
const wrapper = shallow(<NoItems />);
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
|
@ -18,8 +18,7 @@ describe('<NoItem /> component', () => {
|
|||
const props = {
|
||||
text: 'This is a test string'
|
||||
};
|
||||
const wrapper = shallow(<NoItems {...props} />);
|
||||
expect(wrapper.find('h2').text()).toEqual('This is a test string');
|
||||
const wrapper = mount(<NoItems {...props} />);
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue