refactor: Update import statements for jest in test files

This commit updates the import statements for jest in multiple test files. The previous import statements used "globals" as the module name, which is incorrect. The correct module name is "jest". This change ensures that the jest module is imported correctly, improving the accuracy and reliability of the test setup.
This commit is contained in:
Simon Larsen
2024-06-14 14:16:56 +01:00
parent 48e3c24c6e
commit f5fca46e5b
4 changed files with 4 additions and 2 deletions

View File

@@ -15,6 +15,7 @@ import BadDataException from "Common/Types/Exception/BadDataException";
import ObjectID from "Common/Types/ObjectID";
import { UserTenantAccessPermission } from "Common/Types/Permission";
import ApiKey from "Model/Models/ApiKey";
import { describe, expect, afterEach, jest } from "@jest/globals";
jest.mock("../../Services/ApiKeyService");
jest.mock("../../Services/AccessTokenService");

View File

@@ -27,7 +27,7 @@ import {
Subscription,
} from "../TestingUtils/Services/Types";
import { Stripe, mockStripe } from "../TestingUtils/__mocks__/Stripe.mock";
import { describe, expect, it } from "@jest/globals";
import { describe, expect, beforeEach, jest } from "@jest/globals";
import MeteredPlan from "Common/Types/Billing/MeteredPlan";
import SubscriptionPlan from "Common/Types/Billing/SubscriptionPlan";
import SubscriptionStatus from "Common/Types/Billing/SubscriptionStatus";

View File

@@ -9,6 +9,7 @@ import Faker from "Common/Utils/Faker";
import Probe from "Model/Models/Probe";
import User from "Model/Models/User";
import { fail } from "assert";
import { describe, expect, beforeEach, afterEach, test } from "@jest/globals";
describe("probeService", () => {
let database!: Database;

View File

@@ -2,7 +2,7 @@ import Input, { ComponentProps, InputType } from "../../Components/Input/Input";
import "@testing-library/jest-dom/extend-expect";
import { cleanup, fireEvent, render, screen } from "@testing-library/react";
import React from "react";
import { describe, expect, afterEach, jest } from "@jest/globals";
import { describe, expect, afterEach, jest, test } from "@jest/globals";
describe("Input", () => {
afterEach(() => {