diff --git a/packages/core/test/WorkflowExecute.test.ts b/packages/core/test/WorkflowExecute.test.ts index 8ad953c6540c1..684aeaee559d5 100644 --- a/packages/core/test/WorkflowExecute.test.ts +++ b/packages/core/test/WorkflowExecute.test.ts @@ -1,5 +1,10 @@ import type { IRun, WorkflowTestData } from 'n8n-workflow'; -import { ApplicationError, createDeferredPromise, Workflow } from 'n8n-workflow'; +import { + ApplicationError, + createDeferredPromise, + NodeExecutionOutput, + Workflow, +} from 'n8n-workflow'; import { WorkflowExecute } from '@/WorkflowExecute'; import * as Helpers from './helpers'; @@ -192,4 +197,16 @@ describe('WorkflowExecute', () => { }); } }); + + describe('WorkflowExecute, NodeExecutionOutput type test', () => { + //TODO Add more tests here when execution hints are added to some node types + const nodeExecutionOutput = new NodeExecutionOutput( + [[{ json: { data: 123 } }]], + [{ message: 'TEXT HINT' }], + ); + + expect(nodeExecutionOutput).toBeInstanceOf(NodeExecutionOutput); + expect(nodeExecutionOutput[0][0].json.data).toEqual(123); + expect(nodeExecutionOutput.getHints()[0].message).toEqual('TEXT HINT'); + }); }); diff --git a/packages/workflow/test/NodeHelpers.test.ts b/packages/workflow/test/NodeHelpers.test.ts index d26592c21bf97..6a7e70e2e5572 100644 --- a/packages/workflow/test/NodeHelpers.test.ts +++ b/packages/workflow/test/NodeHelpers.test.ts @@ -3463,7 +3463,7 @@ describe('NodeHelpers', () => { expect(hints).toHaveLength(1); expect(hints[0].message).toEqual('TEST HINT'); }); - test('should not include hint id displayCondition false', () => { + test('should not include hint if displayCondition is false', () => { const testType = { hints: [ { @@ -3495,7 +3495,7 @@ describe('NodeHelpers', () => { expect(hints).toHaveLength(0); }); - test('should include hint id displayCondition true', () => { + test('should include hint if displayCondition is true', () => { const testType = { hints: [ {