mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor: Overhaul nodes-testing setup - Part 1 (no-changelog) (#14303)
This commit is contained in:
committed by
GitHub
parent
f85b851851
commit
73e8d76e13
@@ -4,22 +4,14 @@ import nock from 'nock';
|
||||
import { testWorkflows } from '@test/nodes/Helpers';
|
||||
|
||||
describe('Test SendGrid Node', () => {
|
||||
beforeAll(() => {
|
||||
nock.disableNetConnect();
|
||||
});
|
||||
|
||||
describe('Mail', () => {
|
||||
const sendgridNock = nock('https://api.sendgrid.com/v3');
|
||||
|
||||
beforeAll(() => {
|
||||
sendgridNock
|
||||
.post(
|
||||
'/mail/send',
|
||||
(body: { reply_to_list?: [{ email: string }] }) =>
|
||||
body?.reply_to_list?.[0]?.email === 'test-reply-to@n8n.io',
|
||||
)
|
||||
.reply(202);
|
||||
});
|
||||
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);
|
||||
|
||||
testWorkflows(['nodes/SendGrid/test/mail.workflow.json']);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user