Skip to content

Commit

Permalink
🧪 test(cleanup): remove unnecessary setup code
Browse files Browse the repository at this point in the history
  • Loading branch information
thrownullexception committed Nov 8, 2023
1 parent a20c31f commit 4ce9c4f
Show file tree
Hide file tree
Showing 48 changed files with 2 additions and 51 deletions.
1 change: 0 additions & 1 deletion src/__tests__/_app.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen } from "@testing-library/react";

Expand Down
1 change: 0 additions & 1 deletion src/__tests__/account/logout.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, waitFor } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/account/password.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/account/preferences.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, waitFor } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/account/profile.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, waitFor } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/admin/[entity]/[id]/index.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/admin/[entity]/[id]/update.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, waitFor } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/admin/[entity]/config/crud__fields.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, waitFor, within } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/admin/[entity]/config/crud__tab.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, within } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/admin/[entity]/config/diction.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, waitFor } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/admin/[entity]/config/form.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable no-useless-escape */
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, within } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/admin/[entity]/config/presentation.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable no-useless-escape */
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, waitFor } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, waitFor, within } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, waitFor, within } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, waitFor, within } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/admin/[entity]/config/views.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, within } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/admin/[entity]/create.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, waitFor } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/admin/[entity]/index.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/admin/index.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, within } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/admin/settings/date.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, waitFor } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/admin/settings/entities.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, waitFor } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/admin/settings/menu.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, waitFor } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/admin/settings/site.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, waitFor } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/admin/settings/system.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, waitFor } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/admin/settings/theme.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { fireEvent, render, screen, waitFor } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/admin/settings/versions.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, waitFor } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/dashboard/manage__actions.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, within } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/dashboard/manage__order.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable testing-library/no-node-access */
import "@testing-library/jest-dom";
import React, { ReactNode } from "react";
import { render, screen } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/integrations/variables__constants.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, within } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable prettier/prettier */
import "@testing-library/jest-dom";
import React, { ReactNode } from "react";
import { render, screen, within } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/integrations/variables__credentials.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable prettier/prettier */
import "@testing-library/jest-dom";
import React, { ReactNode } from "react";
import { render, screen, within } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/roles/[roleId]/index.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, waitFor, within } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/roles/create.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/roles/index.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, within, waitFor } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/users/[username]/index.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable testing-library/no-node-access */
/* eslint-disable testing-library/no-container */
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, waitFor } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/users/[username]/index__non-admin.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, waitFor } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/users/create.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/users/index.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@testing-library/jest-dom";
import React from "react";
import { render, screen, within, waitFor } from "@testing-library/react";
import { ApplicationRoot } from "frontend/components/ApplicationRoot";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable testing-library/no-container */
/* eslint-disable testing-library/no-node-access */
import "@testing-library/jest-dom";
import React from "react";
import { render } from "@testing-library/react";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import React from "react";
import { fireEvent, render, screen } from "@testing-library/react";
import { RenderList } from ".";

import "@testing-library/jest-dom/extend-expect";

describe("RenderList", () => {
it("should render list items", () => {
render(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import React, { ReactNode } from "react";
import { fireEvent, render, screen, waitFor } from "@testing-library/react";
import { SortList } from ".";

import "@testing-library/jest-dom/extend-expect";

jest.mock("react-easy-sort", () => ({
__esModule: true,
default: ({
Expand Down
2 changes: 0 additions & 2 deletions src/frontend/design-system/components/Table/Table.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { Table } from ".";
import { IProps } from "./types";
import { TABLE_COLUMNS, TABLE_DATA } from "./data";

import "@testing-library/jest-dom/extend-expect";

const DEFAULT_TABLE_PROPS: IProps<unknown> = {
overridePaginatedDataState: {
pageSize: 10,
Expand Down
1 change: 0 additions & 1 deletion src/frontend/design-system/components/Tabs/Tabs.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from "react";
import { render, fireEvent, screen } from "@testing-library/react";
import { SLUG_LOADING_VALUE } from "frontend/lib/routing/constants";
import { Tabs } from ".";
import "@testing-library/jest-dom/extend-expect";

describe("Tabs", () => {
it("should render first tab by default", () => {
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/lib/data/QueryClient.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ReactNode } from "react";
import { QueryClientProvider, QueryClient } from "react-query";

export const queryClient = new QueryClient({
const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: Infinity,
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/lib/routing/constants.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const SLUG_LOADING_VALUE = "loading";
export const SLUG_LOADING_VALUE = "__loading__";

0 comments on commit 4ce9c4f

Please sign in to comment.