Files
ssw-mvp/dacli/tests/unit/workflow_launch_operator_lookup.test.ts
T
admin 4d096dd97e chore(dacli): 提交 dacli CLI 工具源码并过滤敏感/噪声文件
- dacli/ 整目录被 .gitignore 忽略,本次 force-add 其业务源码(766 文件)
- 排除 node_modules/.env(含 PGPASSWORD 等敏感信息)/.DS_Store/__pycache__/*.pyc
- 新增 dacli/.gitignore 长期管理内部噪声,新增文件仍需 git add -f
- 根 .gitignore 补充 .cache/ 与诊断脚本忽略,并加 dacli 段说明
2026-08-06 19:02:39 +08:00

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' },
])
})
})