mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-02-06 21:43:07 +00:00
fix: correct error code access path in integration tests
The validation errors have the code inside details.code, not at the top level. Updated all integration tests to access e.details?.code || e.code instead of e.code. This fixes all 23 failing integration tests: - AI Agent validation tests - AI Tool validation tests - Chat Trigger validation tests - E2E validation tests - LLM Chain validation tests 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -210,7 +210,7 @@ describe('Integration: End-to-End AI Workflow Validation', () => {
|
||||
expect(validationData.errors!.length).toBeGreaterThan(3);
|
||||
|
||||
// Verify specific errors are detected
|
||||
const errorCodes = validationData.errors!.map(e => e.code);
|
||||
const errorCodes = validationData.errors!.map(e => e.details?.code || e.code);
|
||||
|
||||
expect(errorCodes).toContain('MISSING_LANGUAGE_MODEL'); // AI Agent
|
||||
expect(errorCodes).toContain('MISSING_PROMPT_TEXT'); // AI Agent
|
||||
|
||||
Reference in New Issue
Block a user