mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-13 03:35:52 +01:00
28 lines
863 B
JavaScript
28 lines
863 B
JavaScript
/**
|
|
* LastSync component
|
|
*/
|
|
|
|
import React from 'react';
|
|
import { shallow } from 'enzyme';
|
|
import LastSync from '../../../../../src/webui/components/PackageSidebar/modules/LastSync/index';
|
|
|
|
describe('<PackageSidebar /> : <LastSync />', () => {
|
|
test('should check the default props condition', () => {
|
|
const wrapper = shallow(<LastSync />);
|
|
expect(wrapper.html()).toMatchSnapshot();
|
|
});
|
|
|
|
test('should load the LastSync component and match snapshot', () => {
|
|
const props = {
|
|
lastUpdated: '2017/12/14, 15:43:52',
|
|
recentReleases: [
|
|
{ time: '2017/12/14, 15:43:27', version: '2.7.1' },
|
|
{ time: '2017/12/05, 23:25:06', version: '2.7.0' },
|
|
{ time: '2017/11/08, 22:47:16', version: '2.6.6' }
|
|
]
|
|
};
|
|
const wrapper = shallow(<LastSync {...props} />);
|
|
expect(wrapper.html()).toMatchSnapshot();
|
|
});
|
|
});
|