From bd4d4fcc61271a58cb7fcc12e2ea604369919a46 Mon Sep 17 00:00:00 2001 From: Mgrdich Date: Mon, 15 Apr 2024 00:44:56 +0400 Subject: [PATCH] Fix eslint bugs --- .../Schemas/Edit/__tests__/Edit.spec.tsx | 15 ++------------- .../Topics/Topic/__test__/Topic.spec.tsx | 1 - frontend/src/lib/interfaces/topic.ts | 8 +------- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/frontend/src/components/Schemas/Edit/__tests__/Edit.spec.tsx b/frontend/src/components/Schemas/Edit/__tests__/Edit.spec.tsx index 21cf59223..086c1b9ec 100644 --- a/frontend/src/components/Schemas/Edit/__tests__/Edit.spec.tsx +++ b/frontend/src/components/Schemas/Edit/__tests__/Edit.spec.tsx @@ -2,26 +2,15 @@ import React from 'react'; import Edit from 'components/Schemas/Edit/Edit'; import { render, WithRoute } from 'lib/testHelpers'; import { clusterSchemaEditPath } from 'lib/paths'; -import { - schemaVersion, - schemaVersionWithNonAsciiChars, -} from 'components/Schemas/Edit/__tests__/fixtures'; +import { schemaVersion } from 'components/Schemas/Edit/__tests__/fixtures'; import { screen } from '@testing-library/dom'; import ClusterContext, { ContextProps, initialValue as contextInitialValue, } from 'components/contexts/ClusterContext'; -import fetchMock from 'fetch-mock'; -import { act } from '@testing-library/react'; -import { before } from 'lodash'; - -import { - useCreateSchema, - useGetLatestSchema, -} from '../../../../lib/hooks/api/schemas'; +import { useGetLatestSchema } from 'lib/hooks/api/schemas'; const clusterName = 'testClusterName'; -const schemasAPILatestUrl = `/api/clusters/${clusterName}/schemas/${schemaVersion.subject}/latest`; const renderComponent = (context: ContextProps = contextInitialValue) => render( diff --git a/frontend/src/components/Topics/Topic/__test__/Topic.spec.tsx b/frontend/src/components/Topics/Topic/__test__/Topic.spec.tsx index 9f074c2cd..7b5731767 100644 --- a/frontend/src/components/Topics/Topic/__test__/Topic.spec.tsx +++ b/frontend/src/components/Topics/Topic/__test__/Topic.spec.tsx @@ -35,7 +35,6 @@ jest.mock('lib/hooks/api/topics', () => ({ useClearTopicMessages: jest.fn(), })); -const unwrapMock = jest.fn(); const clearTopicMessages = jest.fn(); jest.mock('components/Topics/Topic/Overview/Overview', () => () => ( diff --git a/frontend/src/lib/interfaces/topic.ts b/frontend/src/lib/interfaces/topic.ts index 9617917b9..126294a1f 100644 --- a/frontend/src/lib/interfaces/topic.ts +++ b/frontend/src/lib/interfaces/topic.ts @@ -1,10 +1,4 @@ -import { - Topic, - TopicConfig, - TopicCreation, - TopicMessage, - TopicMessageConsuming, -} from 'generated-sources'; +import { Topic, TopicConfig, TopicCreation } from 'generated-sources'; export type TopicName = Topic['name'];