Skip to content

Commit

Permalink
fixed google sheet tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ShireenMissi committed Feb 21, 2025
1 parent b071520 commit 86a66e5
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { IExecuteFunctions } from 'n8n-workflow';

import { execute } from '../../../v2/actions/sheet/delete.operation';
import type { GoogleSheet } from '../../../v2/helpers/GoogleSheet';
import * as helpers from '@/sso.ee/saml/saml-helpers';

describe('Google Sheet - Delete', () => {
let mockExecuteFunctions: Partial<IExecuteFunctions>;
Expand All @@ -11,6 +12,9 @@ describe('Google Sheet - Delete', () => {
mockExecuteFunctions = {
getInputData: jest.fn().mockReturnValue([{ json: {} }]),
getNodeParameter: jest.fn(),
helpers: {
constructExecutionMetaData: jest.fn((data) => ({ json: data })),
},
} as Partial<IExecuteFunctions>;

mockSheet = {
Expand Down Expand Up @@ -137,6 +141,7 @@ describe('Google Sheet - Delete', () => {
if (param === 'numberToDelete') return 1;
return null;
}) as unknown as IExecuteFunctions['getNodeParameter'];
mockExecuteFunctions.helpers = { constructExecutionMetaData: jest.fn((data) => data) };

const result = await execute.call(
mockExecuteFunctions as IExecuteFunctions,
Expand Down

0 comments on commit 86a66e5

Please sign in to comment.