From 870a110a75b610872aa4f8f5ba33316e7296cfff Mon Sep 17 00:00:00 2001 From: Faruk AYDIN Date: Tue, 24 Oct 2023 12:11:53 +0200 Subject: [PATCH] fix: Fetch lastStep directly on the step factory --- packages/backend/test/factories/step.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/test/factories/step.ts b/packages/backend/test/factories/step.ts index 560808dd..409adda2 100644 --- a/packages/backend/test/factories/step.ts +++ b/packages/backend/test/factories/step.ts @@ -5,7 +5,7 @@ export const createStep = async (params: Partial = {}) => { params.flowId = params?.flowId || (await createFlow()).id; params.type = params?.type || 'action'; - const [lastStep] = await global.knex + const lastStep = await global.knex .table('steps') .where('flowId', params.flowId) .andWhere('deletedAt', '!=', null)