mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 06:40:39 +00:00
refactor: Update import statements for jest in test files
This commit is contained in:
parent
34c5cb1e94
commit
4c4169e245
@ -24,7 +24,14 @@ import {
|
||||
UserTenantAccessPermission,
|
||||
} from "Common/Types/Permission";
|
||||
import Project from "Model/Models/Project";
|
||||
import { describe, expect, beforeEach, test, afterEach, jest } from "@jest/globals";
|
||||
import {
|
||||
describe,
|
||||
expect,
|
||||
beforeEach,
|
||||
test,
|
||||
afterEach,
|
||||
jest,
|
||||
} from "@jest/globals";
|
||||
|
||||
jest.mock("../../Utils/Logger");
|
||||
jest.mock("../../Middleware/ProjectAuthorization");
|
||||
|
@ -8,7 +8,14 @@ import AnalyticsTableEngine from "Common/Types/AnalyticsDatabase/AnalyticsTableE
|
||||
import AnalyticsTableColumn from "Common/Types/AnalyticsDatabase/TableColumn";
|
||||
import TableColumnType from "Common/Types/AnalyticsDatabase/TableColumnType";
|
||||
import GenericObject from "Common/Types/GenericObject";
|
||||
import { describe, expect, beforeEach, test, afterEach, jest } from "@jest/globals";
|
||||
import {
|
||||
describe,
|
||||
expect,
|
||||
beforeEach,
|
||||
test,
|
||||
afterEach,
|
||||
jest,
|
||||
} from "@jest/globals";
|
||||
|
||||
describe("AnalyticsDatabaseService", () => {
|
||||
class TestModel extends AnalyticsBaseModel {
|
||||
|
@ -1,12 +1,11 @@
|
||||
import { ButtonStyleType } from "../../Components/Button/Button";
|
||||
import Item, { ComponentProps } from "../../Components/OrderedStatesList/Item";
|
||||
import { describe, expect, jest } from "@jest/globals";
|
||||
import { describe, expect, jest } from "@jest/globals";
|
||||
import "@testing-library/jest-dom";
|
||||
import { render } from "@testing-library/react";
|
||||
import IconProp from "Common/Types/Icon/IconProp";
|
||||
import React from "react";
|
||||
|
||||
|
||||
describe("Item component", () => {
|
||||
interface ItemData {
|
||||
id: number;
|
||||
|
@ -5,7 +5,7 @@ import SideMenuItem, {
|
||||
ComponentProps,
|
||||
} from "../../Components/SideMenu/SideMenuItem";
|
||||
import * as Navigation from "../../Utils/Navigation";
|
||||
import { describe, expect,afterEach, jest } from "@jest/globals";
|
||||
import { describe, expect, afterEach, jest } from "@jest/globals";
|
||||
import "@testing-library/jest-dom/extend-expect";
|
||||
import { fireEvent, render, screen } from "@testing-library/react";
|
||||
// Types
|
||||
@ -13,7 +13,6 @@ import Route from "Common/Types/API/Route";
|
||||
import IconProp from "Common/Types/Icon/IconProp";
|
||||
import React from "react";
|
||||
|
||||
|
||||
const highlightClassList: string =
|
||||
"bg-gray-100 text-indigo-600 hover:bg-white group rounded-md px-3 py-2 flex items-center text-sm font-medium";
|
||||
|
||||
|
@ -2,7 +2,7 @@ import Toggle from "../../Components/Toggle/Toggle";
|
||||
import "@testing-library/jest-dom/extend-expect";
|
||||
import { fireEvent, render } from "@testing-library/react";
|
||||
import React from "react";
|
||||
import { describe, expect, beforeEach, test, afterEach, jest } from "@jest/globals";
|
||||
import { describe, expect, test, jest } from "@jest/globals";
|
||||
|
||||
describe("Toggle", () => {
|
||||
test("renders toggle element with required props only", () => {
|
||||
|
@ -194,6 +194,7 @@ export default tseslint.config(
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node,
|
||||
...globals.jest,
|
||||
JSX: true,
|
||||
},
|
||||
parserOptions: {
|
||||
|
Loading…
Reference in New Issue
Block a user