refactor(core): Fix type errors in workflow, core, nodes-langchain, and nodes-base (no-changelog) (#9450)
This commit is contained in:
committed by
GitHub
parent
d9616fc36f
commit
2bdc459bb2
@@ -7,7 +7,7 @@ import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
|
||||
|
||||
const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest');
|
||||
|
||||
discordApiRequestSpy.mockImplementation(async (method: string, endpoint) => {
|
||||
discordApiRequestSpy.mockImplementation(async (method: string) => {
|
||||
if (method === 'POST') {
|
||||
return {
|
||||
id: '1168528323006181417',
|
||||
|
||||
@@ -7,7 +7,7 @@ import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
|
||||
|
||||
const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest');
|
||||
|
||||
discordApiRequestSpy.mockImplementation(async (method: string, endpoint) => {
|
||||
discordApiRequestSpy.mockImplementation(async (method: string) => {
|
||||
if (method === 'DELETE') {
|
||||
return {
|
||||
id: '1168528323006181417',
|
||||
|
||||
@@ -5,10 +5,11 @@ import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
|
||||
import type { WorkflowTestData } from '@test/nodes/types';
|
||||
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
|
||||
|
||||
// TODO: use nock
|
||||
const requestApiSpy = jest.spyOn(transport, 'requestApi');
|
||||
|
||||
requestApiSpy.mockImplementation(
|
||||
async (options: IRequestOptions, credentialType: string, endpoint: string) => {
|
||||
async (_options: IRequestOptions, _credentialType: string, endpoint: string) => {
|
||||
if (endpoint === '/users/@me/guilds') {
|
||||
return {
|
||||
headers: {},
|
||||
|
||||
@@ -7,7 +7,7 @@ import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
|
||||
|
||||
const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest');
|
||||
|
||||
discordApiRequestSpy.mockImplementation(async (method: string, endpoint) => {
|
||||
discordApiRequestSpy.mockImplementation(async (method: string) => {
|
||||
if (method === 'GET') {
|
||||
return [
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
|
||||
|
||||
const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest');
|
||||
|
||||
discordApiRequestSpy.mockImplementation(async (method: string, endpoint) => {
|
||||
discordApiRequestSpy.mockImplementation(async (method: string, _) => {
|
||||
if (method === 'PATCH') {
|
||||
return {
|
||||
id: '1168516240332034067',
|
||||
|
||||
@@ -7,7 +7,7 @@ import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
|
||||
|
||||
const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest');
|
||||
|
||||
discordApiRequestSpy.mockImplementation(async (method: string, endpoint) => {
|
||||
discordApiRequestSpy.mockImplementation(async (method: string) => {
|
||||
if (method === 'GET') {
|
||||
return [
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
|
||||
|
||||
const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest');
|
||||
|
||||
discordApiRequestSpy.mockImplementation(async (method: string, endpoint) => {
|
||||
discordApiRequestSpy.mockImplementation(async (method: string) => {
|
||||
if (method === 'PUT') {
|
||||
return {
|
||||
success: true,
|
||||
|
||||
@@ -7,7 +7,7 @@ import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
|
||||
|
||||
const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest');
|
||||
|
||||
discordApiRequestSpy.mockImplementation(async (method: string, endpoint) => {
|
||||
discordApiRequestSpy.mockImplementation(async (method: string) => {
|
||||
if (method === 'DELETE') {
|
||||
return {
|
||||
success: true,
|
||||
|
||||
@@ -7,7 +7,7 @@ import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
|
||||
|
||||
const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest');
|
||||
|
||||
discordApiRequestSpy.mockImplementation(async (method: string, endpoint) => {
|
||||
discordApiRequestSpy.mockImplementation(async (method: string) => {
|
||||
if (method === 'DELETE') {
|
||||
return {
|
||||
success: true,
|
||||
|
||||
@@ -7,7 +7,7 @@ import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
|
||||
|
||||
const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest');
|
||||
|
||||
discordApiRequestSpy.mockImplementation(async (method: string, endpoint) => {
|
||||
discordApiRequestSpy.mockImplementation(async (method: string) => {
|
||||
if (method === 'GET') {
|
||||
return {
|
||||
id: '1168777380144369718',
|
||||
|
||||
@@ -7,7 +7,7 @@ import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
|
||||
|
||||
const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest');
|
||||
|
||||
discordApiRequestSpy.mockImplementation(async (method: string, endpoint) => {
|
||||
discordApiRequestSpy.mockImplementation(async (method: string) => {
|
||||
if (method === 'GET') {
|
||||
return [
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
|
||||
|
||||
const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest');
|
||||
|
||||
discordApiRequestSpy.mockImplementation(async (method: string, endpoint) => {
|
||||
discordApiRequestSpy.mockImplementation(async (method: string) => {
|
||||
if (method === 'PUT') {
|
||||
return {
|
||||
success: true,
|
||||
|
||||
@@ -7,7 +7,7 @@ import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
|
||||
|
||||
const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest');
|
||||
|
||||
discordApiRequestSpy.mockImplementation(async (method: string, endpoint) => {
|
||||
discordApiRequestSpy.mockImplementation(async (method: string) => {
|
||||
if (method === 'POST') {
|
||||
return {
|
||||
id: '1168784010269433998',
|
||||
|
||||
@@ -7,7 +7,7 @@ import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
|
||||
|
||||
const discordApiRequestSpy = jest.spyOn(transport, 'discordApiRequest');
|
||||
|
||||
discordApiRequestSpy.mockImplementation(async (method: string, endpoint) => {
|
||||
discordApiRequestSpy.mockImplementation(async (method: string) => {
|
||||
if (method === 'POST') {
|
||||
return {
|
||||
id: '1168768986385747999',
|
||||
|
||||
Reference in New Issue
Block a user