mirror of
https://github.com/langgenius/dify.git
synced 2026-05-21 17:20:25 +08:00
refactor(tests): restructure workflow run test data for improved organization
- Updated test cases in `use-workflow-run.spec.ts` to encapsulate workflow status and related data within a `data` object for better clarity and maintainability. - Ensured consistency in the structure of test data across different scenarios.
This commit is contained in:
@ -442,10 +442,12 @@ describe('useWorkflowRun', () => {
|
||||
workflow_id: 'flow-1',
|
||||
reason: 'failed',
|
||||
node_type: 'llm',
|
||||
workflow_status: WorkflowRunningStatus.Running,
|
||||
workflow_tracing_count: 1,
|
||||
workflow_data: workflowData,
|
||||
workflow_data_json: JSON.stringify(workflowData),
|
||||
data: {
|
||||
workflow_status: WorkflowRunningStatus.Running,
|
||||
workflow_tracing_count: 1,
|
||||
workflow_data: workflowData,
|
||||
workflow_data_json: JSON.stringify(workflowData),
|
||||
},
|
||||
})
|
||||
|
||||
mocks.mockTrackEvent.mockClear()
|
||||
@ -455,10 +457,12 @@ describe('useWorkflowRun', () => {
|
||||
workflow_id: 'flow-1',
|
||||
reason: 'Server Error',
|
||||
node_type: undefined,
|
||||
workflow_status: WorkflowRunningStatus.Running,
|
||||
workflow_tracing_count: 1,
|
||||
workflow_data: workflowData,
|
||||
workflow_data_json: JSON.stringify(workflowData),
|
||||
data: {
|
||||
workflow_status: WorkflowRunningStatus.Running,
|
||||
workflow_tracing_count: 1,
|
||||
workflow_data: workflowData,
|
||||
workflow_data_json: JSON.stringify(workflowData),
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user