1
0
mirror of https://github.com/SomboChea/ui synced 2024-11-16 03:04:27 +07:00
verdaccio-ui/test/unit/components/footer.spec.js
Juan Picado @jotadeveloper 9d7be476ad chore: relocate unit test (#39)
add new json snapshot serializer
2019-05-01 21:02:46 +02:00

23 lines
552 B
JavaScript

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'
}));
describe('<Footer /> component', () => {
let wrapper;
beforeEach(() => {
window.VERDACCIO_VERSION = 'v.1.0.0';
wrapper = mount(<Footer />);
delete window.VERDACCIO_VERSION;
});
test('should load the initial state of Footer component', () => {
expect(wrapper.html()).toMatchSnapshot();
});
});