From 28f045cd4c5a450c10d5756411da050477bdc83d Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Wed, 21 Sep 2022 17:10:07 +0530 Subject: [PATCH] fix(nocodb): Fixed issue regarding getRow helper in test env where it doesnt return undefined if row id doesnt exist --- packages/nocodb/tests/unit/factory/row.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/nocodb/tests/unit/factory/row.ts b/packages/nocodb/tests/unit/factory/row.ts index ddf1a9c4fa..78540c943d 100644 --- a/packages/nocodb/tests/unit/factory/row.ts +++ b/packages/nocodb/tests/unit/factory/row.ts @@ -29,6 +29,10 @@ const getRow = async (context, {project, table, id}) => { .get(`/api/v1/db/data/noco/${project.id}/${table.id}/${id}`) .set('xc-auth', context.token); + if(response.status !== 200) { + return undefined + } + return response.body; };