test(client): cover workspace ordering transports
This commit is contained in:
@@ -223,7 +223,7 @@ describe('unary round trip', () => {
|
||||
expect(response.result).toEqual({ ok: true, value: { sessionId: 's-child' } })
|
||||
})
|
||||
|
||||
it('routes workspace rename, delete, and insertSessionBefore through the wire', async () => {
|
||||
it('routes workspace rename, delete, and ordering through the wire', async () => {
|
||||
const api = scriptedApi()
|
||||
const c = client(api)
|
||||
const renamed = await c.workspace.rename({ workspaceId: 'w1' as never, title: 'next' })
|
||||
@@ -232,6 +232,11 @@ describe('unary round trip', () => {
|
||||
expect(blankTitle.result).toMatchObject({ ok: false, error: { code: 'bad-request' } })
|
||||
const deleted = await c.workspace.delete({ workspaceId: 'w1' as never })
|
||||
expect(deleted.result).toEqual({ ok: true, value: { deleted: true } })
|
||||
const workspaceOrder = await c.workspace.insertBefore({
|
||||
workspaceId: 'w1' as never,
|
||||
beforeWorkspaceId: 'w2' as never,
|
||||
})
|
||||
expect(workspaceOrder.result).toEqual({ ok: true, value: { workspaceIds: ['w1'] } })
|
||||
const anchored = await c.workspace.insertSessionBefore({ workspaceId: 'w1' as never, sessionId: sid('s1'), beforeSessionId: sid('s2') })
|
||||
expect(anchored.result.ok).toBe(true)
|
||||
const appended = await c.workspace.insertSessionBefore({ workspaceId: 'w1' as never, sessionId: sid('s1') })
|
||||
|
||||
Reference in New Issue
Block a user