From 405e9bc720922b4490a37fe4c117dc946f4f36e5 Mon Sep 17 00:00:00 2001 From: Jamey Huffnagle Date: Wed, 6 Mar 2024 21:25:37 -0500 Subject: [PATCH] lint and type fixes --- app/src/atoms/MenuList/__tests__/OverflowBtn.test.tsx | 2 ++ .../ProtocolRun/__tests__/ProtocolRunHeader.test.tsx | 5 ++--- .../DropTipWizard/__tests__/TipsAttachedModal.test.tsx | 1 - shared-data/Makefile | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/atoms/MenuList/__tests__/OverflowBtn.test.tsx b/app/src/atoms/MenuList/__tests__/OverflowBtn.test.tsx index 5279fa68a86..e0e8258a0b0 100644 --- a/app/src/atoms/MenuList/__tests__/OverflowBtn.test.tsx +++ b/app/src/atoms/MenuList/__tests__/OverflowBtn.test.tsx @@ -48,6 +48,7 @@ describe('OverflowBtn', () => { onClick: vi.fn(), }) + // @ts-expect-error Refactor to test modifier states. expect(getByRole('button')).toHaveStyleRule( 'box-shadow', `0 0 0 3px ${String(COLORS.yellow50)}`, @@ -62,6 +63,7 @@ describe('OverflowBtn', () => { onClick: vi.fn(), }) + // @ts-expect-error Refactor to test modifier states. expect(getByRole('button')).toHaveStyleRule( 'fill', `${String(COLORS.grey40)}`, diff --git a/app/src/organisms/Devices/ProtocolRun/__tests__/ProtocolRunHeader.test.tsx b/app/src/organisms/Devices/ProtocolRun/__tests__/ProtocolRunHeader.test.tsx index 772e327fffb..93c6d13f5a4 100644 --- a/app/src/organisms/Devices/ProtocolRun/__tests__/ProtocolRunHeader.test.tsx +++ b/app/src/organisms/Devices/ProtocolRun/__tests__/ProtocolRunHeader.test.tsx @@ -103,7 +103,6 @@ import type { Mock } from 'vitest' import type * as OpentronsSharedData from '@opentrons/shared-data' import type * as OpentronsComponents from '@opentrons/components' import type * as OpentronsApiClient from '@opentrons/api-client' -import type { Run } from '@opentrons/api-client' const mockPush = vi.fn() @@ -349,7 +348,7 @@ describe('ProtocolRunHeader', () => { vi.mocked(useDeckConfigurationCompatibility).mockReturnValue([]) vi.mocked(getIsFixtureMismatch).mockReturnValue(false) vi.mocked(useMostRecentRunId).mockReturnValue(RUN_ID) - vi.mocked(useRobot).mockReturnValue({ + vi.mocked(useRobot).mockReturnValue({ ...mockConnectableRobot, health: { ...mockConnectableRobot.health, @@ -821,7 +820,7 @@ describe('ProtocolRunHeader', () => { .calledWith(RUN_ID) .thenReturn({ data: { data: mockSucceededRun }, - } as UseQueryResult) + } as UseQueryResult) when(vi.mocked(useRunStatus)) .calledWith(RUN_ID) .thenReturn(RUN_STATUS_SUCCEEDED) diff --git a/app/src/organisms/DropTipWizard/__tests__/TipsAttachedModal.test.tsx b/app/src/organisms/DropTipWizard/__tests__/TipsAttachedModal.test.tsx index 5246ff1bbf7..504beb48668 100644 --- a/app/src/organisms/DropTipWizard/__tests__/TipsAttachedModal.test.tsx +++ b/app/src/organisms/DropTipWizard/__tests__/TipsAttachedModal.test.tsx @@ -11,7 +11,6 @@ import { handleTipsAttachedModal } from '../TipsAttachedModal' import { LEFT } from '@opentrons/shared-data' import { mockPipetteInfo } from '../../../redux/pipettes/__fixtures__' import { ROBOT_MODEL_OT3 } from '../../../redux/discovery' -import { useNotifyService } from '../../../resources/useNotifyService' import { useNotifyCurrentMaintenanceRun } from '../../../resources/maintenance_runs/useNotifyCurrentMaintenanceRun' import type { PipetteModelSpecs } from '@opentrons/shared-data' diff --git a/shared-data/Makefile b/shared-data/Makefile index 3ce6bcb5f4d..22f6c0755f7 100644 --- a/shared-data/Makefile +++ b/shared-data/Makefile @@ -3,10 +3,10 @@ # using bash instead of /bin/bash in SHELL prevents macOS optimizing away our PATH update SHELL := bash -# These variables can be overridden when make is invoked to customize the +# These variables can be overriden when make is invoked to customize the # behavior of jest tests ?= -cov_opts ?= --coverage=true --ci=true --collectCoverageFrom='shared-data/js/**/*.(js|ts|tsx)' +cov_opts ?= --coverage=true --collectCoverageFrom='shared-data/js/**/*.(js|ts|tsx)' test_opts ?= # Top level targets @@ -28,7 +28,7 @@ clean: clean-py .PHONY: lib-js lib-js: export NODE_ENV := production lib-js: - yarn vite build + NODE_OPTIONS=--openssl-legacy-provider yarn vite build