From 57cb77e6432926f14e258d2991a1368a75e5645c Mon Sep 17 00:00:00 2001 From: wrzesinski-hubert Date: Thu, 14 Jan 2021 14:27:59 +0100 Subject: [PATCH] new test --- src/components/__tests__/Scheduler.test.jsx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/components/__tests__/Scheduler.test.jsx diff --git a/src/components/__tests__/Scheduler.test.jsx b/src/components/__tests__/Scheduler.test.jsx new file mode 100644 index 0000000..ff3e140 --- /dev/null +++ b/src/components/__tests__/Scheduler.test.jsx @@ -0,0 +1,20 @@ +import React from 'react'; +import { cleanup, fireEvent, waitForElement, screen } from '@testing-library/react'; +import '@testing-library/jest-dom/extend-expect'; +import { customRender,customRenderCAS } from '../../customRender'; +import {Scheduler} from '../Scheduler'; + +beforeAll(() => { + delete window.location; + window.location = { replace: jest.fn() }; +}); + +afterAll(() => { + window.location = location; +}); + +test('renders component', async () => { + const addItem = jest.fn(); + customRender(); + expect(screen.getByText(/chuj/i)).toBeInTheDocument(); + }); \ No newline at end of file