Rearrange mocks
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
|
jest.mock("../Contexts/UserContext");
|
||||||
|
jest.mock("../Contexts/UserContext");
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { BrowserRouter } from 'react-router-dom';
|
import { BrowserRouter } from 'react-router-dom';
|
||||||
import {render, cleanup, screen, fireEvent, waitFor} from "@testing-library/react"
|
import {render, cleanup, screen, fireEvent, waitFor} from "@testing-library/react"
|
||||||
jest.mock("../Contexts/UserContext");
|
|
||||||
import { useUserContext, UserProvider } from "../Contexts/UserContext";
|
import { useUserContext, UserProvider } from "../Contexts/UserContext";
|
||||||
import FileUploadForm from './index';
|
import FileUploadForm from './index';
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import React from "react";
|
|||||||
import { BrowserRouter } from 'react-router-dom';
|
import { BrowserRouter } from 'react-router-dom';
|
||||||
import {render, cleanup, screen, fireEvent, waitFor} from "@testing-library/react"
|
import {render, cleanup, screen, fireEvent, waitFor} from "@testing-library/react"
|
||||||
jest.mock("../Contexts/UserContext");
|
jest.mock("../Contexts/UserContext");
|
||||||
|
|
||||||
import { useUserContext, UserProvider } from "../Contexts/UserContext";
|
import { useUserContext, UserProvider } from "../Contexts/UserContext";
|
||||||
import SignInForm from './index';
|
import SignInForm from './index';
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
|
jest.mock("../Contexts/UserContext");
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { BrowserRouter } from 'react-router-dom';
|
import { BrowserRouter } from 'react-router-dom';
|
||||||
import {render, cleanup, screen, fireEvent, waitFor} from "@testing-library/react"
|
import {render, cleanup, screen, fireEvent, waitFor} from "@testing-library/react"
|
||||||
jest.mock("../Contexts/UserContext");
|
|
||||||
import { useUserContext, UserProvider } from "../Contexts/UserContext";
|
import { useUserContext, UserProvider } from "../Contexts/UserContext";
|
||||||
import SignUpForm from './index';
|
import SignUpForm from './index';
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
|
jest.mock("../../services/auth");
|
||||||
|
|
||||||
import {render, cleanup, screen, fireEvent, waitFor} from "@testing-library/react"
|
import {render, cleanup, screen, fireEvent, waitFor} from "@testing-library/react"
|
||||||
import { UserProvider, useUserContext } from "../Contexts/UserContext";
|
import { UserProvider, useUserContext } from "../Contexts/UserContext";
|
||||||
import auth from "../../services/auth";
|
import auth from "../../services/auth";
|
||||||
|
|
||||||
const TEST_TOKEN = { accessToken: { jwtToken: "TEST" }};
|
const TEST_TOKEN = { accessToken: { jwtToken: "TEST" }};
|
||||||
|
|
||||||
jest.mock("../../services/auth");
|
|
||||||
|
|
||||||
describe("UseContext", () => {
|
describe("UseContext", () => {
|
||||||
|
|
||||||
describe("Signup", () => {
|
describe("Signup", () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user