Skip to content

Commit

Permalink
fix(ts): missing mock methods
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Dec 20, 2024
1 parent 361e673 commit a1d5413
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jest/mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {},
}),
),

Expand Down

0 comments on commit a1d5413

Please sign in to comment.