feat: Modernize build and testing for workflow package (no-changelog) (#16771)

This commit is contained in:
Alex Grozav
2025-06-30 20:02:16 +03:00
committed by GitHub
parent d1d5412bfb
commit c76d94b364
70 changed files with 733 additions and 486 deletions

View File

@@ -7,7 +7,7 @@ import {
type INodeParameters,
type INodeProperties,
type INodeTypeDescription,
} from '@/interfaces';
} from '../src/interfaces';
import {
getNodeParameters,
isSubNodeType,
@@ -21,8 +21,8 @@ import {
isDefaultNodeName,
makeNodeName,
isTool,
} from '@/node-helpers';
import type { Workflow } from '@/workflow';
} from '../src/node-helpers';
import type { Workflow } from '../src/workflow';
describe('NodeHelpers', () => {
describe('getNodeParameters', () => {
@@ -4226,7 +4226,7 @@ describe('NodeHelpers', () => {
describe('isExecutable', () => {
const workflowMock = {
expression: {
getSimpleParameterValue: jest.fn().mockReturnValue([NodeConnectionTypes.Main]),
getSimpleParameterValue: vi.fn().mockReturnValue([NodeConnectionTypes.Main]),
},
} as unknown as Workflow;
@@ -4382,7 +4382,7 @@ describe('NodeHelpers', () => {
test(testData.description, () => {
// If this test has a custom mock return value, configure it
if (testData.mockReturnValue) {
(workflowMock.expression.getSimpleParameterValue as jest.Mock).mockReturnValueOnce(
vi.mocked(workflowMock.expression.getSimpleParameterValue).mockReturnValueOnce(
testData.mockReturnValue,
);
}