1
0
Fork 1
mirror of https://github.com/SomboChea/ui synced 2024-05-03 01:51:37 +07:00
verdaccio-ui/src/components/Footer/Footer.test.tsx
2019-10-10 22:20:05 +02:00

22 lines
518 B
TypeScript

import React from 'react';
import { mount, ReactWrapper } from 'enzyme';
import Footer from './Footer';
jest.mock('../../../package.json', () => ({
version: '4.0.0-alpha.3',
}));
describe('<Footer /> component', () => {
let wrapper: ReactWrapper;
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();
});
});