本仓 2026-08-12 从 ssw main (192.168.1.18:13300/ssw/ssw-mvp) 的 dacli/ subpath 抽取,作为独立仓托管到 gitea:3000/ssw/dacli.git。 - 工作树为 ssw main dacli subpath 最新版 (110 commit, 08-12) - 历史未带 ssw main 整体历史(避免大仓污染) - 此为新仓基线 commit,未来以本仓历史为主
19 lines
847 B
TypeScript
19 lines
847 B
TypeScript
import { describe, expect, it, vi } from 'vitest'
|
|
import { getLaunchOperatorList } from '../../src/commands/workflow/launch.ts'
|
|
|
|
describe('workflow launch operator lookup', () => {
|
|
it('queries web categories without the wrong template-id filter and matches the launched task locally', async () => {
|
|
const getList = vi.fn()
|
|
.mockResolvedValueOnce({ list: [{ id: 'other', taskId: 'otherTask', handleId: 9 }] })
|
|
.mockResolvedValueOnce({ list: [{ id: 'todo1', taskId: 'task1', handleId: 2 }] })
|
|
|
|
const result = await getLaunchOperatorList(getList, { flowId: 'template1', taskId: 'task1' })
|
|
|
|
expect(getList).toHaveBeenNthCalledWith(1, { category: 0 })
|
|
expect(getList).toHaveBeenNthCalledWith(2, { category: 1 })
|
|
expect(result).toEqual([
|
|
{ id: 'todo1', taskId: 'task1', handleId: 2, userId: '2' },
|
|
])
|
|
})
|
|
})
|