2019-04-05 02:23:40 +07:00
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
import { mount } from 'enzyme';
|
|
|
|
|
2019-05-02 02:02:46 +07:00
|
|
|
import Footer from '../../../src/webui/components/Footer/index';
|
2019-04-05 02:23:40 +07:00
|
|
|
|
2019-05-02 02:02:46 +07:00
|
|
|
jest.mock('../../../package.json', () => ({
|
2019-04-05 02:23:40 +07:00
|
|
|
version: '4.0.0-alpha.3'
|
2019-04-14 04:27:44 +07:00
|
|
|
}));
|
2019-04-05 02:23:40 +07:00
|
|
|
|
|
|
|
describe('<Footer /> component', () => {
|
|
|
|
let wrapper;
|
|
|
|
beforeEach(() => {
|
2019-04-14 04:27:44 +07:00
|
|
|
window.VERDACCIO_VERSION = 'v.1.0.0';
|
2019-04-05 02:23:40 +07:00
|
|
|
wrapper = mount(<Footer />);
|
2019-04-14 04:27:44 +07:00
|
|
|
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();
|
|
|
|
});
|
|
|
|
});
|