fix: restore master's branded-id casts in ui-workspace apply spec

A stale-lib eslint --fix pass during the merge stripped the 'as never'
casts the branded WorkspaceId/SessionId parameters require; typecheck
rejects the push. Take master's version verbatim.
This commit is contained in:
Tianyi Cui
2026-07-26 21:37:42 +08:00
parent 0f712c8ade
commit a4644413e5

View File

@@ -55,13 +55,13 @@ describe('ui-workspace apply', () => {
await b.ctx.plugin({ inject: [...inject], apply }).await()
const browser = (b.slots.entries('sidebar.workspaces')[0]!.inject as () => WorkspaceBrowserInjected)()
browser.startSession('ws', 'prompt')
browser.startSession('ws' as never, 'prompt')
expect(b.startSession).toHaveBeenCalledWith('ws', 'prompt')
browser.open('session')
browser.open('session' as never)
expect(b.open).toHaveBeenCalledWith('session')
await browser.renameWorkspace('ws', 'renamed')
await browser.renameWorkspace('ws' as never, 'renamed')
expect(b.rename).toHaveBeenCalledWith('ws', 'renamed')
await browser.insertSessionBefore('ws', 's1', 's2')
await browser.insertSessionBefore('ws' as never, 's1' as never, 's2' as never)
expect(b.insertSessionBefore).toHaveBeenCalledWith('ws', 's1', 's2')
await browser.createWorkspace({ name: 'project' })
expect(b.create).toHaveBeenCalledWith({ name: 'project' })