mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
test(core): Add basic expression tests (no-changelog) (#5439)
* test(core): add basic expression tests * test: fix $if test not working properly
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Expression, INodeExecutionData, Workflow } from '../../src';
|
||||
import { Expression, IDataObject, Workflow } from '../../src';
|
||||
import * as Helpers from '../Helpers';
|
||||
|
||||
export const TEST_TIMEZONE = 'America/New_York';
|
||||
@@ -21,14 +21,14 @@ export const workflow = new Workflow({
|
||||
});
|
||||
export const expression = new Expression(workflow);
|
||||
|
||||
export const evaluate = (value: string, values?: INodeExecutionData[]) =>
|
||||
export const evaluate = (value: string, values?: IDataObject[]) =>
|
||||
expression.getParameterValue(
|
||||
value,
|
||||
null,
|
||||
0,
|
||||
0,
|
||||
'node',
|
||||
values ?? [],
|
||||
values?.map((v) => ({ json: v })) ?? [],
|
||||
'manual',
|
||||
TEST_TIMEZONE,
|
||||
{},
|
||||
|
||||
Reference in New Issue
Block a user