diff --git a/ui/jest.polyfills.ts b/ui/jest.polyfills.ts index 94ad52b31..597b8c0eb 100644 --- a/ui/jest.polyfills.ts +++ b/ui/jest.polyfills.ts @@ -9,15 +9,19 @@ * you don't want to deal with this. */ +const { performance } = require('node:perf_hooks'); const { TextDecoder, TextEncoder } = require('node:util'); const { TransformStream } = require('node:stream/web'); const { BroadcastChannel } = require('node:worker_threads'); +const { clearImmediate } = require('node:timers'); Object.defineProperties(globalThis, { TextDecoder: { value: TextDecoder }, TextEncoder: { value: TextEncoder }, TransformStream: { value: TransformStream }, BroadcastChannel: { value: BroadcastChannel }, + clearImmediate: { value: clearImmediate }, + performance: { value: performance }, }); const { Blob } = require('node:buffer'); diff --git a/ui/src/components/DeleteModal/DeleteModal.test.tsx b/ui/src/components/DeleteModal/DeleteModal.test.tsx index 37de666b3..dbd8dbc4d 100644 --- a/ui/src/components/DeleteModal/DeleteModal.test.tsx +++ b/ui/src/components/DeleteModal/DeleteModal.test.tsx @@ -5,7 +5,6 @@ import { http, HttpResponse } from 'msw'; import DeleteModal from './DeleteModal'; import { server } from '../../mocks/server'; -jest.mock('immutability-helper'); jest.mock('../../util/util'); const handleClose = jest.fn(); diff --git a/ui/src/components/table/tests/TableWrapper.test.tsx b/ui/src/components/table/tests/TableWrapper.test.tsx index f625a438c..f420e6271 100644 --- a/ui/src/components/table/tests/TableWrapper.test.tsx +++ b/ui/src/components/table/tests/TableWrapper.test.tsx @@ -14,8 +14,6 @@ import { SIMPLE_NAME_TABLE_MOCK_DATA, } from '../stories/configMockups'; -jest.mock('immutability-helper'); - const handleRequestModalOpen = jest.fn(); const handleOpenPageStyleDialog = jest.fn();