From 16e1d4782b1237b34ed5f5750189dc8afe7baa2e Mon Sep 17 00:00:00 2001 From: Mav-Ivan <110425368+Mav-Ivan@users.noreply.github.com> Date: Thu, 17 Oct 2024 13:30:09 +0300 Subject: [PATCH] added test --- .../chat/messages-list/MessagesList.spec.jsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/unit/pages/chat/messages-list/MessagesList.spec.jsx b/tests/unit/pages/chat/messages-list/MessagesList.spec.jsx index 96333ecc62..aa4cf50648 100644 --- a/tests/unit/pages/chat/messages-list/MessagesList.spec.jsx +++ b/tests/unit/pages/chat/messages-list/MessagesList.spec.jsx @@ -6,7 +6,7 @@ vi.mock('~/components/message/Message', () => ({ default: vi.fn(() =>
Mock Message
) })) -vi.spyOn(window, "getComputedStyle").mockReturnValue(new CSSStyleDeclaration) +vi.spyOn(window, 'getComputedStyle').mockReturnValue(new CSSStyleDeclaration()) global.IntersectionObserver = vi.fn().mockImplementation((callback) => ({ observe: vi.fn(), @@ -74,4 +74,17 @@ describe('MessagesList component', () => { ) expect(screen.getByText(/2024/i)).toBeInTheDocument() }) + + it('loader should be render', () => { + renderWithProviders( + + ) + const loader = screen.getByTestId('loader') + + expect(loader).toBeInTheDocument() + }) })