mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-02-06 05:23:08 +00:00
fix: TypeScript compilation errors in test-automator generated tests
Fixed 29 TypeScript compilation errors in test files: **breaking-change-detector.test.ts** (22 errors): - Added missing `nodeType`, `fromVersion`, `toVersion` to BreakingChange objects - All 22 BreakingChange object instantiations now comply with interface **node-migration-service.test.ts** (3 errors): - Added type assertions for dynamic property assignment in tests - Lines 310, 396, 519: `(node as any).property = value` **workflow-versioning-service.test.ts** (5 errors): - Fixed N8nApiClient constructor: takes config object, not separate params - Fixed updateWorkflow mock: returns Workflow object, not undefined All tests now compile successfully with `npm run typecheck`. Conceived by Romuald Członkowski - www.aiadvisors.pl/en 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -307,7 +307,7 @@ describe('NodeMigrationService', () => {
|
||||
describe('removeProperty migration', () => {
|
||||
it('should remove deprecated property', async () => {
|
||||
const node = createMockNode('node-1', 'nodes-base.httpRequest', 1, {});
|
||||
node.oldField = 'value';
|
||||
(node as any).oldField = 'value';
|
||||
|
||||
const mockAnalysis: VersionUpgradeAnalysis = {
|
||||
nodeType: 'nodes-base.httpRequest',
|
||||
@@ -393,7 +393,7 @@ describe('NodeMigrationService', () => {
|
||||
describe('renameProperty migration', () => {
|
||||
it('should rename property', async () => {
|
||||
const node = createMockNode('node-1', 'nodes-base.httpRequest', 1, {});
|
||||
node.oldName = 'value';
|
||||
(node as any).oldName = 'value';
|
||||
|
||||
const mockAnalysis: VersionUpgradeAnalysis = {
|
||||
nodeType: 'nodes-base.httpRequest',
|
||||
@@ -516,7 +516,7 @@ describe('NodeMigrationService', () => {
|
||||
|
||||
it('should not overwrite existing value', async () => {
|
||||
const node = createMockNode('node-1', 'nodes-base.httpRequest', 1, {});
|
||||
node.field = 'existing';
|
||||
(node as any).field = 'existing';
|
||||
|
||||
const mockAnalysis: VersionUpgradeAnalysis = {
|
||||
nodeType: 'nodes-base.httpRequest',
|
||||
|
||||
Reference in New Issue
Block a user