Skip to content

Commit 5268adc

Browse files
committed
test(i18n, app-shell): the lazy namespace tests' chunk mocks spread the real module
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgXDwFw71MwSG9FKYDQ
1 parent 9cf51c2 commit 5268adc

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎ui/packages/app-shell/src/console/marketplace/__tests__/MarketplacePage.namespaceGate-30588.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ vi.mock('../../../components/SuggestedBindingsPanel', () => ({ SuggestedBindings
8484
vi.mock('@object-ui/i18n/namespaces/marketplace/ar', async (importOriginal) => {
8585
arChunk.requests += 1;
8686
if (arChunk.fails) throw new Error('chunk offline');
87-
return importOriginal();
87+
return { ...(await importOriginal<Record<string, unknown>>()) };
8888
});
8989

9090
import { I18nProvider } from '@object-ui/i18n';

‎ui/packages/i18n/src/__tests__/marketplace-namespace-lazy.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const koChunk = vi.hoisted(() => ({ fails: true, requests: 0 }));
5454
vi.mock('../namespaces/marketplace/ko.js', async (importOriginal) => {
5555
koChunk.requests += 1;
5656
if (koChunk.fails) throw new Error('chunk offline');
57-
return importOriginal();
57+
return { ...(await importOriginal<Record<string, unknown>>()) };
5858
});
5959

6060
const PACKS: Record<string, Record<string, unknown>> = {

0 commit comments

Comments
 (0)