Skip to content

Commit

Permalink
temp: removing useModel mock
Browse files Browse the repository at this point in the history
  • Loading branch information
ilee2u committed Dec 13, 2024
1 parent bf791da commit 07ce69a
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 42 deletions.
16 changes: 0 additions & 16 deletions src/data/__factories__/courseHomeMeta.factory.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/data/__factories__/courseMeta.factory.js

This file was deleted.

2 changes: 0 additions & 2 deletions src/data/__factories__/index.js

This file was deleted.

4 changes: 0 additions & 4 deletions src/data/thunks.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { v4 as uuidv4 } from 'uuid';
import { Factory } from 'rosie';
import { sendTrackEvent } from '@edx/frontend-platform/analytics';
import { setModel } from '@src/generic/model-store'; // eslint-disable-line import/no-unresolved

import { fetchLearningAssistantChatSummary } from './api';

Expand Down Expand Up @@ -30,8 +28,6 @@ describe('Thunks unit tests', () => {
const mockDate = new Date(2024, 1, 1);

beforeEach(async () => {
setModel('coursewareMeta', Factory.build('coursewareMeta'));
setModel('courseHomeMeta', Factory.build('courseHomeMeta'));
jest.useFakeTimers('modern');
jest.setSystemTime(mockDate);
});
Expand Down
12 changes: 0 additions & 12 deletions src/setupTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,3 @@ import { mergeConfig } from '@edx/frontend-platform';
mergeConfig({
...process.env,
});

const mockModelStore = {};
jest.mock(
'@src/generic/model-store',
() => ({
useModel: jest.fn((type) => mockModelStore[type]),
setModel: jest.fn((type, data) => {
mockModelStore[type] = data;
}),
}),
{ virtual: true },
);

0 comments on commit 07ce69a

Please sign in to comment.