mirror of
https://github.com/n8n-io/n8n.git
synced 2026-08-28 17:22:01 +08:00
b0a10229a0
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
26 lines
832 B
TypeScript
26 lines
832 B
TypeScript
import { workflowExpectedForCase } from '../harness/build-workflow';
|
|
|
|
describe('workflowExpectedForCase', () => {
|
|
const scenario = {
|
|
name: 'happy-path',
|
|
description: '',
|
|
dataSetup: '',
|
|
successCriteria: '',
|
|
};
|
|
|
|
it('expects a workflow when the case declares execution scenarios', () => {
|
|
expect(workflowExpectedForCase({ executionScenarios: [scenario] })).toBe(true);
|
|
});
|
|
|
|
it('expects a workflow when the case declares outcome expectations', () => {
|
|
expect(workflowExpectedForCase({ outcomeExpectations: ['Saves a workflow'] })).toBe(true);
|
|
});
|
|
|
|
it('expects no workflow for answer-only cases (neither scenarios nor outcome expectations)', () => {
|
|
expect(workflowExpectedForCase({})).toBe(false);
|
|
expect(workflowExpectedForCase({ executionScenarios: [], outcomeExpectations: [] })).toBe(
|
|
false,
|
|
);
|
|
});
|
|
});
|