refactor(core): Reorganize webhook related components under src/webhooks (no-changelog) (#10296)

This commit is contained in:
Tomi Turtiainen
2024-08-07 11:23:44 +03:00
committed by GitHub
parent 2a8f1753e8
commit c8d322a9ba
23 changed files with 118 additions and 104 deletions

View File

@@ -3,13 +3,13 @@ import { agent as testAgent } from 'supertest';
import { mock } from 'jest-mock-extended';
import { AbstractServer } from '@/AbstractServer';
import { ActiveWebhooks } from '@/ActiveWebhooks';
import { ActiveWebhooks } from '@/webhooks/ActiveWebhooks';
import { ExternalHooks } from '@/ExternalHooks';
import { InternalHooks } from '@/InternalHooks';
import { TestWebhooks } from '@/TestWebhooks';
import { WaitingWebhooks } from '@/WaitingWebhooks';
import { TestWebhooks } from '@/webhooks/TestWebhooks';
import { WaitingWebhooks } from '@/webhooks/WaitingWebhooks';
import { WaitingForms } from '@/WaitingForms';
import type { IResponseCallbackData } from '@/Interfaces';
import type { IWebhookResponseCallbackData } from '@/webhooks/webhook.types';
import { mockInstance } from '@test/mocking';
import { GlobalConfig } from '@n8n/config';
@@ -80,7 +80,7 @@ describe('WebhookServer', () => {
}
const mockResponse = (data = {}, headers = {}, status = 200) => {
const response = mock<IResponseCallbackData>();
const response = mock<IWebhookResponseCallbackData>();
response.responseCode = status;
response.data = data;
response.headers = headers;