Skip to content

Commit 32d3504

Browse files
PKulkoRaccoonGangbydawen
authored andcommitted
build: Upgrade to Node 24
1 parent 8702630 commit 32d3504

File tree

7 files changed

+12415
-9096
lines changed

7 files changed

+12415
-9096
lines changed

.github/workflows/validate.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ jobs:
1212
strategy:
1313
matrix:
1414
node: [20, 24]
15-
continue-on-error: ${{ matrix.node == 24 }}
1615
steps:
1716
- uses: actions/checkout@v5
1817
- uses: actions/setup-node@v4

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20
1+
24

jest.config.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,4 @@ const config = createConfig('jest', {
2222
testEnvironment: 'jsdom',
2323
});
2424

25-
// delete config.testURL;
26-
27-
config.reporters = [...(config.reporters || []), ["jest-console-group-reporter", {
28-
// change this setting if need to see less details for each test
29-
// reportType: "summary" | "details",
30-
// enable: true | false,
31-
afterEachTest: {
32-
enable: true,
33-
filePaths: false,
34-
reportType: "details",
35-
},
36-
afterAllTests: {
37-
reportType: "summary",
38-
enable: true,
39-
filePaths: true,
40-
},
41-
}]];
42-
4325
module.exports = config;

package-lock.json

Lines changed: 12371 additions & 9073 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/courseware/course/new-sidebar/SidebarContextProvider.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ const SidebarProvider: React.FC<Props> = ({
2626
const { verifiedMode } = useModel('courseHomeMeta', courseId);
2727
const topic = useModel('discussionTopics', unitId);
2828
const windowWidth = useWindowSize().width ?? window.innerWidth;
29-
const shouldDisplayFullScreen = windowWidth < breakpoints.large.minWidth;
30-
const shouldDisplaySidebarOpen = windowWidth > breakpoints.medium.minWidth;
29+
const shouldDisplayFullScreen = windowWidth < (breakpoints.large?.minWidth ?? 992);
30+
const shouldDisplaySidebarOpen = windowWidth > (breakpoints.medium?.minWidth ?? 768);
3131
const query = new URLSearchParams(window.location.search);
3232
const isInitiallySidebarOpen = shouldDisplaySidebarOpen || query.get('sidebar') === 'true';
3333
const sidebarKey = `sidebar.${courseId}`;

src/courseware/course/new-sidebar/sidebars/discussions-notifications/notifications/NotificationsWidget.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe('NotificationsWidget', () => {
4444
}
4545

4646
beforeEach(async () => {
47-
global.innerWidth = breakpoints.large.minWidth;
47+
global.innerWidth = breakpoints.large?.minWidth ?? 992;
4848
store = initializeStore();
4949
axiosMock = new MockAdapter(getAuthenticatedHttpClient());
5050
axiosMock.onGet(courseMetadataUrl).reply(200, defaultMetadata);

src/setupTest.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,46 @@ jest.mock('@src/generic/plugin-store', () => ({
3939
usePluginsCallback: jest.fn((_, cb) => cb),
4040
}));
4141

42+
/* eslint-disable react/prop-types */
43+
/* eslint-disable global-require */
44+
jest.mock('@openedx/paragon', () => {
45+
const ReactLib = require('react');
46+
const actual = jest.requireActual('@openedx/paragon');
47+
48+
return {
49+
...actual,
50+
Modal: ({
51+
isOpen, title, body, children, onClose,
52+
}) => {
53+
if (!isOpen) {
54+
return null;
55+
}
56+
57+
let content = null;
58+
if (body) {
59+
content = ReactLib.createElement('div', null, body);
60+
} else if (title) {
61+
content = ReactLib.createElement('iframe', {
62+
title,
63+
src: 'test-url',
64+
});
65+
}
66+
67+
return ReactLib.createElement(
68+
'div',
69+
{ role: 'dialog' },
70+
ReactLib.createElement('div', {
71+
'data-testid': 'modal-backdrop',
72+
onClick: onClose || (() => {}),
73+
}),
74+
content,
75+
children,
76+
);
77+
},
78+
};
79+
});
80+
/* eslint-enable react/prop-types */
81+
4282
class MockLoggingService {
4383
// eslint-disable-next-line no-console
4484
logInfo = jest.fn(infoString => console.log(infoString));

0 commit comments

Comments
 (0)