fix(deps): regenerate package-lock.json (#1855)
* fix(deps): regenerate package-lock.json Co-Authored-By: Claude Code <noreply@anthropic.com> * fix(deps): regenerate package-lock.json Moved @openedx/frontend-build from dependencies to devDependencies. Removed direct jest devDependency which was causing ts-jest hoisting issues. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(tests): use require() for MockedPluginSlot in jest.mock Jest hoists jest.mock() calls to the top of the file, which caused MockedPluginSlot to be undefined when the mock factory executed. Using require() inside the factory ensures it loads at runtime. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(types): handle nullable breakpoint types Paragon's breakpoint types now have optional minWidth/maxWidth properties. Added non-null assertions since these values are always defined in practice. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(tests): add IntlProvider to ContentIFrame tests Paragon's ModalDialog now uses useIntl() (openedx/paragon#3624), requiring an IntlProvider in the component ancestry. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(tests): await async operations in Course tests Fixed dangling waitFor blocks that weren't awaited, causing tests to not actually wait for async operations. Changed to properly use await with screen.findBy*() queries. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(tests): use dynamic imports in LearnerToolsSlot tests Jest hoists mock calls but ES imports run before the test body. Using dynamic imports in beforeEach ensures mocks are set up before modules are loaded. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -26,13 +26,17 @@ import { getCourseOutlineStructure } from './courseware/data/thunks';
|
||||
import { appendBrowserTimezoneToUrl, executeThunk } from './utils';
|
||||
import buildSimpleCourseAndSequenceMetadata from './courseware/data/__factories__/sequenceMetadata.factory';
|
||||
import { buildOutlineFromBlocks } from './courseware/data/__factories__/learningSequencesOutline.factory';
|
||||
import MockedPluginSlot from './tests/MockedPluginSlot';
|
||||
|
||||
jest.mock('@openedx/frontend-plugin-framework', () => ({
|
||||
...jest.requireActual('@openedx/frontend-plugin-framework'),
|
||||
Plugin: () => 'Plugin',
|
||||
PluginSlot: MockedPluginSlot,
|
||||
}));
|
||||
jest.mock('@openedx/frontend-plugin-framework', () => {
|
||||
// eslint-disable-next-line global-require
|
||||
const MockedPluginSlot = require('./tests/MockedPluginSlot').default;
|
||||
|
||||
return {
|
||||
...jest.requireActual('@openedx/frontend-plugin-framework'),
|
||||
Plugin: () => 'Plugin',
|
||||
PluginSlot: MockedPluginSlot,
|
||||
};
|
||||
});
|
||||
|
||||
jest.mock('@src/generic/plugin-store', () => ({
|
||||
...jest.requireActual('@src/generic/plugin-store'),
|
||||
|
||||
Reference in New Issue
Block a user