fix: Set tournament for nodes test harness (#15346)

This commit is contained in:
Iván Ovejero
2025-05-13 14:21:43 +02:00
committed by GitHub
parent a3a23de0d7
commit 069992524d
2 changed files with 7 additions and 3 deletions

View File

@@ -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);