Skip to content

Commit 164fc56

Browse files
committed
test: mock useParagonTheme behavior
1 parent 1e210e5 commit 164fc56

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/setupTest.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import messages from './i18n';
1313
jest.mock('@edx/frontend-platform/react/hooks', () => ({
1414
...jest.requireActual('@edx/frontend-platform/react/hooks'),
1515
useTrackColorSchemeChoice: jest.fn(),
16+
useParagonTheme: () => [{ isThemeLoaded: true }, jest.fn()],
1617
}));
1718

1819
Object.defineProperty(window, 'matchMedia', {
@@ -57,11 +58,6 @@ export function initializeMockApp() {
5758
return { loggingService, i18nService, authService };
5859
}
5960

60-
jest.mock('@edx/frontend-platform/react/hooks', () => ({
61-
...jest.requireActual('@edx/frontend-platform/react/hooks'),
62-
useTrackColorSchemeChoice: jest.fn(),
63-
}));
64-
6561
function render(ui, options) {
6662
// eslint-disable-next-line react/prop-types
6763
function Wrapper({ children }) {

0 commit comments

Comments
 (0)