Skip to content

Commit

Permalink
test(TableWrapper): remove mocking immutability-helper dep (#1471)
Browse files Browse the repository at this point in the history
  • Loading branch information
vtsvetkov-splunk authored Nov 26, 2024
1 parent 29accc4 commit 69f7a5a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ui/jest.polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
1 change: 0 additions & 1 deletion ui/src/components/DeleteModal/DeleteModal.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 0 additions & 2 deletions ui/src/components/table/tests/TableWrapper.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 69f7a5a

Please sign in to comment.