mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat(core): Node hints(warnings) system (#8954)
This commit is contained in:
@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user