mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
test(Gmail Trigger Node): Add tests (no-changelog) (#11076)
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { mock } from 'jest-mock-extended';
|
||||
import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
|
||||
|
||||
import { ExecuteWorkflowTrigger } from '../ExecuteWorkflowTrigger.node';
|
||||
|
||||
describe('ExecuteWorkflowTrigger', () => {
|
||||
it('should return its input data', async () => {
|
||||
const mockInputData: INodeExecutionData[] = [
|
||||
{ json: { item: 0, foo: 'bar' } },
|
||||
{ json: { item: 1, foo: 'quz' } },
|
||||
];
|
||||
const executeFns = mock<IExecuteFunctions>({
|
||||
getInputData: () => mockInputData,
|
||||
});
|
||||
const result = await new ExecuteWorkflowTrigger().execute.call(executeFns);
|
||||
|
||||
expect(result).toEqual([mockInputData]);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user