From 273e0a2f71d5df51b99c65aeba3bda32c21515c1 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Fri, 5 Jan 2024 03:06:54 +0530 Subject: [PATCH] refactor: fix convert to boolean before assertion Signed-off-by: Pranav C --- .../tests/unit/rest/tests/columnTypeSpecific.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/nocodb/tests/unit/rest/tests/columnTypeSpecific.test.ts b/packages/nocodb/tests/unit/rest/tests/columnTypeSpecific.test.ts index 33c6ede84e..780f54a1a2 100644 --- a/packages/nocodb/tests/unit/rest/tests/columnTypeSpecific.test.ts +++ b/packages/nocodb/tests/unit/rest/tests/columnTypeSpecific.test.ts @@ -158,10 +158,10 @@ function columnTypeSpecificTests() { expect(columns.length).to.equal(4); expect(columns[2].title).to.equal('CreatedAt'); expect(columns[2].uidt).to.equal(UITypes.CreatedTime); - expect(columns[2].system).to.equal(true); + expect(!!columns[2].system).to.equal(true); expect(columns[3].title).to.equal('UpdatedAt'); expect(columns[3].uidt).to.equal(UITypes.LastModifiedTime); - expect(columns[3].system).to.equal(true); + expect(!!columns[3].system).to.equal(true); }); it('New table: should not be able to delete system fields', async () => { @@ -306,7 +306,7 @@ function columnTypeSpecificTests() { // verify contents of both fields are same expect(columns.columns[4].title).to.equal('CreatedAt2'); expect(columns.columns[4].uidt).to.equal(UITypes.CreatedTime); - expect(columns.columns[4].system).to.equal(false); + expect(!!columns.columns[4].system).to.equal(false); expect(records[0].CreatedAt).to.equal(records[0].CreatedAt2); const d1 = new Date(); @@ -351,7 +351,7 @@ function columnTypeSpecificTests() { // verify contents of both fields are same expect(columns.columns[4].title).to.equal('CreatedAt2'); expect(columns.columns[4].uidt).to.equal(UITypes.CreatedTime); - expect(columns.columns[4].system).to.equal(false); + expect(!!columns.columns[4].system).to.equal(false); expect(records[0].CreatedAt).to.equal(records[0].CreatedAt2); }); });