Skip to content

Commit

Permalink
test: fix and enable useObjectSelection tests (#1198)
Browse files Browse the repository at this point in the history
  • Loading branch information
T-Wizard committed Mar 30, 2023
1 parent 2ae60c3 commit fc53017
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions apis/nucleus/src/hooks/__tests__/use-object-selections.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import * as useAppSelectionsModule from '../useAppSelections';
import * as useLayoutModule from '../useLayout';
import * as selectionsStoreModule from '../../stores/selections-store';

jest.mock('../../stores/selections-store');
jest.mock('../useAppSelections');
jest.mock('../useLayout');

const TestHook = forwardRef(({ hook, hookProps = [] }, ref) => {
const result = hook(...hookProps);
useImperativeHandle(ref, () => ({
Expand All @@ -15,7 +19,7 @@ const TestHook = forwardRef(({ hook, hookProps = [] }, ref) => {
return null;
});

describe.skip('useObjectSelections', () => {
describe('useObjectSelections', () => {
let renderer;
let render;
let ref;
Expand Down Expand Up @@ -48,11 +52,7 @@ describe.skip('useObjectSelections', () => {
appSel = {
isModal: jest.fn(),
};
layout = {
qListObject: {
qDimensionInfo: { qLocked: false },
},
};
layout = {};
modalObjectStore = {
set: jest.fn(),
get: jest.fn(),
Expand Down Expand Up @@ -103,6 +103,10 @@ describe.skip('useObjectSelections', () => {
});

afterEach(() => {
jest.clearAllMocks();
});

afterAll(() => {
renderer.unmount();
jest.restoreAllMocks();
jest.resetAllMocks();
Expand Down

0 comments on commit fc53017

Please sign in to comment.