Skip to content

Commit

Permalink
fix(jest): add missing loadSession and saveSession mock
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Oct 20, 2023
1 parent eeb0e21 commit 80adc19
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions jest/mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()),

Expand Down

0 comments on commit 80adc19

Please sign in to comment.