From a1d54137bb0fc7883e5a7ff4235d21a4121ecd01 Mon Sep 17 00:00:00 2001 From: Jhen-Jie Hong Date: Fri, 20 Dec 2024 13:04:33 +0800 Subject: [PATCH] fix(ts): missing mock methods --- jest/mock.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jest/mock.js b/jest/mock.js index ace189e..19e732f 100644 --- a/jest/mock.js +++ b/jest/mock.js @@ -2,10 +2,15 @@ const { NativeModules, DeviceEventEmitter } = require('react-native') if (!NativeModules.RNLlama) { NativeModules.RNLlama = { + setContextLimit: jest.fn(), + + modelInfo: jest.fn(async () => ({})), + initContext: jest.fn(() => Promise.resolve({ gpu: false, reasonNoGPU: 'Test', + model: {}, }), ),