new test
This commit is contained in:
parent
b06a6ec07e
commit
57cb77e643
20
src/components/__tests__/Scheduler.test.jsx
Normal file
20
src/components/__tests__/Scheduler.test.jsx
Normal file
@ -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(<Scheduler/>);
|
||||||
|
expect(screen.getByText(/chuj/i)).toBeInTheDocument();
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user