This commit is contained in:
Maciek Głowacki
2021-01-05 19:23:44 +01:00
parent 72782880c0
commit b8ef87fc83
8 changed files with 370 additions and 15257 deletions

View File

@ -0,0 +1,21 @@
import React from 'react';
import { cleanup, fireEvent, screen } from '@testing-library/react';
import '@testing-library/jest-dom/extend-expect';
import { customRender } from '../../customRender';
import { App } from '../App';
beforeAll(() => {
delete window.location;
window.location = { replace: jest.fn() };
});
afterAll(() => {
window.location = location;
});
afterEach(cleanup);
test('renders application', async () => {
customRender(<App />);
expect(screen.getByText(/plan na plan/i)).toBeInTheDocument();
});