test
This commit is contained in:
@@ -19,7 +19,7 @@ function mockMemory({ stats, summaries, since }) {
|
||||
calls.sinceAfterId = Number(u.split('/since/').at(-1));
|
||||
return json(since.filter(ep => ep.id > calls.sinceAfterId));
|
||||
}
|
||||
if (u.includes('/api/generate')) return json({ response: 'A concise third-person summary.' });
|
||||
if (u.endsWith('/utility/complete')) return json({ text: 'A concise third-person summary.' });
|
||||
if (u.endsWith('/summaries') && opts.method === 'POST') { calls.posted = JSON.parse(opts.body); return json({ id: 99 }); }
|
||||
if (/\/summaries\/\d+$/.test(u) && opts.method === 'PATCH') { calls.patched = JSON.parse(opts.body); return json({ ok: true }); }
|
||||
throw new Error('unexpected fetch: ' + u);
|
||||
|
||||
Reference in New Issue
Block a user