diff --git a/src/components/Loader/Loader.test.tsx b/src/components/Loader/Loader.test.tsx index c182c73f4f..c512b480e3 100644 --- a/src/components/Loader/Loader.test.tsx +++ b/src/components/Loader/Loader.test.tsx @@ -1,16 +1,24 @@ import React from 'react'; import { render, screen } from '@testing-library/react'; -import { BrowserRouter } from 'react-router-dom'; - import Loader from './Loader'; describe('Testing Loader component', () => { test('Component should be rendered properly', () => { - render( - - - - ); + render(); + + expect(screen.getByTestId('spinner-wrapper')).toBeInTheDocument(); + expect(screen.getByTestId('spinner')).toBeInTheDocument(); + }); + + test('Component should render on custom sizes', () => { + render(); + + expect(screen.getByTestId('spinner-wrapper')).toBeInTheDocument(); + expect(screen.getByTestId('spinner')).toBeInTheDocument(); + }); + + test('Component should render with large size', () => { + render(); expect(screen.getByTestId('spinner-wrapper')).toBeInTheDocument(); expect(screen.getByTestId('spinner')).toBeInTheDocument();