Skip to content

Commit e02acc4

Browse files
committed
chore: added comments for clarity
1 parent 43016d7 commit e02acc4

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/library-authoring/backup-restore/LibraryBackupPage.test.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ const render = (libraryId: string = mockContentLibrary.libraryId) => baseRender(
1717
),
1818
});
1919

20+
// Mocking i18n to prevent having to generate all dynamic translations for this specific test file
21+
// Other tests can still use the real implementation as needed
2022
jest.mock('@edx/frontend-platform/i18n', () => ({
2123
...jest.requireActual('@edx/frontend-platform/i18n'),
2224
useIntl: () => ({
@@ -27,6 +29,8 @@ jest.mock('@edx/frontend-platform/i18n', () => ({
2729
const mockLibraryData:
2830
{ data: typeof mockContentLibrary.libraryData | undefined } = { data: mockContentLibrary.libraryData };
2931

32+
// TODO: consider using the usual mockContentLibrary.applyMocks pattern after figuring out
33+
// why it doesn't work here as expected
3034
jest.mock('@src/library-authoring/data/apiHooks', () => ({
3135
useContentLibrary: () => (mockLibraryData),
3236
}));

0 commit comments

Comments
 (0)