mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 03:42:16 +00:00
fix(AMQP Trigger Node): Update rhea library, tweak reconnection options (#18980)
This commit is contained in:
@@ -108,13 +108,15 @@ describe('ScheduleTrigger', () => {
|
||||
});
|
||||
|
||||
it('should emit when manually executed', async () => {
|
||||
const { emit } = await testTriggerNode(ScheduleTrigger, {
|
||||
const { emit, manualTriggerFunction } = await testTriggerNode(ScheduleTrigger, {
|
||||
mode: 'manual',
|
||||
timezone,
|
||||
node: { parameters: { rule: { interval: [{ field: 'hours', hoursInterval: 3 }] } } },
|
||||
workflowStaticData: { recurrenceRules: [] },
|
||||
});
|
||||
|
||||
await manualTriggerFunction?.();
|
||||
|
||||
expect(emit).toHaveBeenCalledTimes(1);
|
||||
|
||||
const firstTriggerData = emit.mock.calls[0][0][0][0];
|
||||
@@ -134,25 +136,26 @@ describe('ScheduleTrigger', () => {
|
||||
});
|
||||
|
||||
it('should throw on invalid cron expressions in manual mode', async () => {
|
||||
await expect(
|
||||
testTriggerNode(ScheduleTrigger, {
|
||||
mode: 'manual',
|
||||
timezone,
|
||||
node: {
|
||||
parameters: {
|
||||
rule: {
|
||||
interval: [
|
||||
{
|
||||
field: 'cronExpression',
|
||||
expression: '@daily *', // adding extra fields to shorthand not allowed -> invalid
|
||||
},
|
||||
],
|
||||
},
|
||||
const { manualTriggerFunction } = await testTriggerNode(ScheduleTrigger, {
|
||||
mode: 'manual',
|
||||
timezone,
|
||||
node: {
|
||||
parameters: {
|
||||
rule: {
|
||||
interval: [
|
||||
{
|
||||
field: 'cronExpression',
|
||||
expression: '@daily *', // adding extra fields to shorthand not allowed -> invalid
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
workflowStaticData: {},
|
||||
}),
|
||||
).rejects.toBeInstanceOf(n8nWorkflow.NodeOperationError);
|
||||
},
|
||||
workflowStaticData: {},
|
||||
});
|
||||
await expect(manualTriggerFunction?.()).rejects.toBeInstanceOf(
|
||||
n8nWorkflow.NodeOperationError,
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user