diff --git a/vitest.setup.ts b/vitest.setup.ts index f96a69ea..f945ea95 100644 --- a/vitest.setup.ts +++ b/vitest.setup.ts @@ -128,6 +128,12 @@ class NangoActionMock { const paginateInBody = ['post', 'put', 'patch'].includes(args.method.toLowerCase()); const updatedBodyOrParams = paginateInBody ? (args.data as Record) || {} : args.params || {}; + if (args.paginate['limit']) { + const limitParameterName = args.paginate.limit_name_in_request!; + + updatedBodyOrParams[limitParameterName] = args.paginate['limit']; + } + if (args.paginate?.type === 'cursor') { yield* this.cursorPaginate(args, updatedBodyOrParams, paginateInBody); } else if (args.paginate?.type === 'link') {