39% but error

This commit is contained in:
2024-10-19 10:57:44 +03:00
parent 5f386c0f4e
commit 79289457c9
6 changed files with 11 additions and 6 deletions

View File

@@ -3,7 +3,7 @@ import { render, screen } from "@testing-library/react";
import { Provider } from "react-redux";
import configureStore from "redux-mock-store";
import Home from "src/pages/Home";
import { useGetChatsQuery } from "../backend/redux/api_slice";
import { useGetChatsQuery } from "src/backend/redux/api_slice";
// Mock Redux store
const mockStore = configureStore([]);

View File

@@ -1,14 +1,14 @@
import React from "react";
import { render, screen, fireEvent } from "@testing-library/react";
import SignIn from "../pages/SignIn";
import { displayMessage } from "../backend/notifications/notifications";
import { post } from "../backend/api";
import SignIn from "src/pages/SignIn";
import { displayMessage } from "src/backend/notifications/notifications";
import { post } from "src/backend/api";
// Mock the displayMessage and post functions
jest.mock("../backend/notifications/notifications", () => ({
jest.mock("src/backend/notifications/notifications", () => ({
displayMessage: jest.fn(),
}));
jest.mock("../backend/api", () => ({
jest.mock("src/backend/api", () => ({
post: jest.fn(),
}));