From 069992524d3a45b0f10183379cc0168c67f661fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Tue, 13 May 2025 14:21:43 +0200 Subject: [PATCH] fix: Set `tournament` for nodes test harness (#15346) --- packages/core/nodes-testing/node-test-harness.ts | 8 +++++++- .../nodes/Microsoft/Entra/test/UserDescription.test.ts | 2 -- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/core/nodes-testing/node-test-harness.ts b/packages/core/nodes-testing/node-test-harness.ts index 43100c2e7c..5d1ccf2766 100644 --- a/packages/core/nodes-testing/node-test-harness.ts +++ b/packages/core/nodes-testing/node-test-harness.ts @@ -12,7 +12,12 @@ import type { IWorkflowExecuteAdditionalData, WorkflowTestData, } from 'n8n-workflow'; -import { createDeferredPromise, UnexpectedError, Workflow } from 'n8n-workflow'; +import { + createDeferredPromise, + ExpressionEvaluatorProxy, + UnexpectedError, + Workflow, +} from 'n8n-workflow'; import nock from 'nock'; import { readFileSync, mkdtempSync, existsSync, rmSync } from 'node:fs'; import { tmpdir } from 'node:os'; @@ -44,6 +49,7 @@ export class NodeTestHarness { private readonly packagePaths: string[]; constructor({ additionalPackagePaths }: TestHarnessOptions = {}) { + ExpressionEvaluatorProxy.setEvaluator('tournament'); this.testDir = path.dirname(callsites()[1].getFileName()!); this.packagePaths = additionalPackagePaths ?? []; this.packagePaths.unshift(this.packageDir); diff --git a/packages/nodes-base/nodes/Microsoft/Entra/test/UserDescription.test.ts b/packages/nodes-base/nodes/Microsoft/Entra/test/UserDescription.test.ts index 77a4d71d31..98e884a47e 100644 --- a/packages/nodes-base/nodes/Microsoft/Entra/test/UserDescription.test.ts +++ b/packages/nodes-base/nodes/Microsoft/Entra/test/UserDescription.test.ts @@ -1076,8 +1076,6 @@ describe('Microsoft Entra Node', () => { employeeId: 'employee-id-123', employeeType: 'Contractor', givenName: 'John', - employeeHireDate: null, - employeeLeaveDateTime: null, employeeOrgData: { costCenter: 'Cost Center 1', division: 'Division 1',