verdaccio-ui/test/unit/webui/components/footer.spec.js

23 lines
558 B
JavaScript
Raw Normal View History

2019-04-05 02:23:40 +07:00
import React from 'react';
import { mount } from 'enzyme';
import Footer from '../../../../src/webui/components/Footer/index';
jest.mock('../../../../package.json', () => ({
version: '4.0.0-alpha.3'
}));
2019-04-05 02:23:40 +07:00
describe('<Footer /> component', () => {
let wrapper;
beforeEach(() => {
window.VERDACCIO_VERSION = 'v.1.0.0';
2019-04-05 02:23:40 +07:00
wrapper = mount(<Footer />);
delete window.VERDACCIO_VERSION;
2019-04-05 02:23:40 +07:00
});
test('should load the initial state of Footer component', () => {
expect(wrapper.html()).toMatchSnapshot();
});
});