Skip to content

Commit

Permalink
test: Move @testing-library/jest-dom import to test setup file
Browse files Browse the repository at this point in the history
This removes `@testing-library/jest-dom` from single test files and adds it to the shared setup.ts file.
  • Loading branch information
regexowl authored and ezr-ondrej committed Jul 22, 2024
1 parent f26e4f4 commit eb2cfe9
Show file tree
Hide file tree
Showing 19 changed files with 1 addition and 24 deletions.
2 changes: 0 additions & 2 deletions src/Components/Blueprints/ImportBlueprintModal.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import '@testing-library/jest-dom';

import { screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';

Expand Down
1 change: 0 additions & 1 deletion src/test/Components/Blueprints/Blueprints.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';

import '@testing-library/jest-dom';
import { screen, waitFor, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { http, HttpResponse } from 'msw';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import '@testing-library/jest-dom';

import type { Router as RemixRouter } from '@remix-run/router';
import { screen, waitFor } from '@testing-library/react';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import React from 'react';

import '@testing-library/jest-dom';

import { screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import React from 'react';

import '@testing-library/jest-dom';

import type { Router as RemixRouter } from '@remix-run/router';
import { screen, waitFor, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import React from 'react';

import '@testing-library/jest-dom';

import type { Router as RemixRouter } from '@remix-run/router';
import {
screen,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import '@testing-library/jest-dom';
import { screen, within } from '@testing-library/react';

import { renderEditMode } from './wizardTestUtils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { screen, waitFor } from '@testing-library/react';
import '@testing-library/jest-dom';
import { userEvent } from '@testing-library/user-event';

import { CREATE_BLUEPRINT, EDIT_BLUEPRINT } from '../../../../../constants';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import '@testing-library/jest-dom';
import { screen, waitFor } from '@testing-library/react';
import { userEvent } from '@testing-library/user-event';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import '@testing-library/jest-dom';

import { screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import '@testing-library/jest-dom';
import { screen, waitFor, within } from '@testing-library/react';
import { userEvent } from '@testing-library/user-event';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import '@testing-library/jest-dom';
import { screen, waitFor } from '@testing-library/react';
import { userEvent } from '@testing-library/user-event';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import '@testing-library/jest-dom';
import { screen, waitFor } from '@testing-library/react';
import { userEvent } from '@testing-library/user-event';

Expand Down
1 change: 0 additions & 1 deletion src/test/Components/ImagesTable/ImagesTable.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import '@testing-library/jest-dom';
import { screen, waitFor, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';

Expand Down
1 change: 0 additions & 1 deletion src/test/Components/LandingPage/LandingPage.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import '@testing-library/jest-dom';
import { screen } from '@testing-library/react';
import { http, HttpResponse } from 'msw';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';

import '@testing-library/jest-dom';
import { screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';

Expand Down
2 changes: 0 additions & 2 deletions src/test/Components/edge/EdgeImagesTable.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import '@testing-library/jest-dom';

import { useFlag } from '@unleash/proxy-client-react';

vi.mock('@unleash/proxy-client-react', () => ({
Expand Down
2 changes: 0 additions & 2 deletions src/test/Components/edge/ImageDetails.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import '@testing-library/jest-dom';

import { useFlag } from '@unleash/proxy-client-react';

vi.mock('@unleash/proxy-client-react', () => ({
Expand Down
1 change: 1 addition & 0 deletions src/test/setup.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@testing-library/jest-dom';
import { configure } from '@testing-library/react';

import { server } from './mocks/server';
Expand Down

0 comments on commit eb2cfe9

Please sign in to comment.