Files
n8n-enterprise-unlocked/packages/nodes-base/nodes/SendGrid/test/SendGrid.node.test.ts
कारतोफ्फेलस्क्रिप्ट™ 979f9e6327 refactor: Overhaul nodes-testing setup - Part 3 (no-changelog) (#14967)
2025-04-29 17:42:21 +02:00

22 lines
591 B
TypeScript

/* eslint-disable n8n-nodes-base/node-param-display-name-miscased */
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
import nock from 'nock';
describe('Test SendGrid Node', () => {
describe('Mail', () => {
const sendgridNock = nock('https://api.sendgrid.com/v3')
.post(
'/mail/send',
(body: { reply_to_list?: [{ email: string }] }) =>
body?.reply_to_list?.[0]?.email === 'test-reply-to@n8n.io',
)
.reply(202);
afterAll(() => sendgridNock.done());
new NodeTestHarness().setupTests({
workflowFiles: ['mail.workflow.json'],
});
});
});