diff --git a/jest/mock.js b/jest/mock.js index b9db93b8..7f2944a0 100644 --- a/jest/mock.js +++ b/jest/mock.js @@ -144,6 +144,12 @@ if (!NativeModules.RNLlama) { detokenize: jest.fn(async () => ''), embedding: jest.fn(async () => []), + loadSession: jest.fn(async () => ({ + tokens_loaded: 1, + prompt: 'Hello', + })), + saveSession: jest.fn(async () => 1), + releaseContext: jest.fn(() => Promise.resolve()), releaseAllContexts: jest.fn(() => Promise.resolve()),