Skip to content

Commit 144b77b

Browse files
committed
test(bare-rn): mock models registry so post-#1148 App.tsx renders
1 parent 8c02351 commit 144b77b

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎apps/bare-rn/__mocks__/react-native-executorch.js‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,12 @@ module.exports = {
1111
interrupt: jest.fn(),
1212
}),
1313
LLAMA3_2_1B_SPINQUANT: 'LLAMA3_2_1B_SPINQUANT',
14+
// After PR #1148 (MODEL_REGISTRY) merged to main, App.tsx imports
15+
// `models.<domain>.<modelName>()` instead of bare constants. Mock both
16+
// shapes so the smoke test passes regardless of which API the merged
17+
// tree happens to use.
18+
models: new Proxy(
19+
{},
20+
{ get: () => new Proxy({}, { get: () => () => ({}) }) }
21+
),
1422
};

0 commit comments

Comments
 (0)