From fe8853580e2f43bfd991db1f9ba8e90e47f7866e Mon Sep 17 00:00:00 2001 From: adrinr Date: Fri, 3 Feb 2023 18:40:25 +0000 Subject: [PATCH] Tweak tests --- packages/server/src/api/routes/tests/permissions.spec.js | 5 ++++- packages/server/src/api/routes/tests/screen.spec.js | 2 +- packages/server/src/db/tests/linkController.spec.js | 1 - 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/server/src/api/routes/tests/permissions.spec.js b/packages/server/src/api/routes/tests/permissions.spec.js index 888eb1014c..ed131aed80 100644 --- a/packages/server/src/api/routes/tests/permissions.spec.js +++ b/packages/server/src/api/routes/tests/permissions.spec.js @@ -15,8 +15,11 @@ describe("/permission", () => { afterAll(setup.afterAll) - beforeEach(async () => { + beforeAll(async () => { await config.init() + }) + + beforeEach(async () => { table = await config.createTable() row = await config.createRow() perms = await config.addPermission(STD_ROLE_ID, table._id) diff --git a/packages/server/src/api/routes/tests/screen.spec.js b/packages/server/src/api/routes/tests/screen.spec.js index 1266724320..a3748d6a79 100644 --- a/packages/server/src/api/routes/tests/screen.spec.js +++ b/packages/server/src/api/routes/tests/screen.spec.js @@ -10,7 +10,7 @@ describe("/screens", () => { afterAll(setup.afterAll) - beforeEach(async () => { + beforeAll(async () => { await config.init() screen = await config.createScreen() }) diff --git a/packages/server/src/db/tests/linkController.spec.js b/packages/server/src/db/tests/linkController.spec.js index 2adf06d57f..866796fd56 100644 --- a/packages/server/src/db/tests/linkController.spec.js +++ b/packages/server/src/db/tests/linkController.spec.js @@ -10,7 +10,6 @@ describe("test the link controller", () => { let table1, table2, appId beforeAll(async () => { - config.modeCloud() const app = await config.init() appId = app.appId })