mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-21 09:44:21 +01:00
basic undo feature (#1268)
Co-authored-by: adamdotdevin <2363879+adamdottv@users.noreply.github.com> Co-authored-by: Jay V <air@live.ca> Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Co-authored-by: Andrew Joslin <andrew@ajoslin.com> Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Tobias Walle <9933601+tobias-walle@users.noreply.github.com>
This commit is contained in:
@@ -118,6 +118,23 @@ describe('resource session', () => {
|
||||
expect(dataAndResponse.response).toBe(rawResponse);
|
||||
});
|
||||
|
||||
// skipped: tests are disabled for the time being
|
||||
test.skip('revert: only required params', async () => {
|
||||
const responsePromise = client.session.revert('id', { messageID: 'msg' });
|
||||
const rawResponse = await responsePromise.asResponse();
|
||||
expect(rawResponse).toBeInstanceOf(Response);
|
||||
const response = await responsePromise;
|
||||
expect(response).not.toBeInstanceOf(Response);
|
||||
const dataAndResponse = await responsePromise.withResponse();
|
||||
expect(dataAndResponse.data).toBe(response);
|
||||
expect(dataAndResponse.response).toBe(rawResponse);
|
||||
});
|
||||
|
||||
// skipped: tests are disabled for the time being
|
||||
test.skip('revert: required and optional params', async () => {
|
||||
const response = await client.session.revert('id', { messageID: 'msg', partID: 'prt' });
|
||||
});
|
||||
|
||||
// skipped: tests are disabled for the time being
|
||||
test.skip('share', async () => {
|
||||
const responsePromise = client.session.share('id');
|
||||
@@ -147,6 +164,18 @@ describe('resource session', () => {
|
||||
const response = await client.session.summarize('id', { modelID: 'modelID', providerID: 'providerID' });
|
||||
});
|
||||
|
||||
// skipped: tests are disabled for the time being
|
||||
test.skip('unrevert', async () => {
|
||||
const responsePromise = client.session.unrevert('id');
|
||||
const rawResponse = await responsePromise.asResponse();
|
||||
expect(rawResponse).toBeInstanceOf(Response);
|
||||
const response = await responsePromise;
|
||||
expect(response).not.toBeInstanceOf(Response);
|
||||
const dataAndResponse = await responsePromise.withResponse();
|
||||
expect(dataAndResponse.data).toBe(response);
|
||||
expect(dataAndResponse.response).toBe(rawResponse);
|
||||
});
|
||||
|
||||
// skipped: tests are disabled for the time being
|
||||
test.skip('unshare', async () => {
|
||||
const responsePromise = client.session.unshare('id');
|
||||
|
||||
Reference in New Issue
Block a user