diff --git a/packages/server/src/api/routes/tests/automation.spec.js b/packages/server/src/api/routes/tests/automation.spec.js index 61d6b7db9a..2cb05a1483 100644 --- a/packages/server/src/api/routes/tests/automation.spec.js +++ b/packages/server/src/api/routes/tests/automation.spec.js @@ -16,14 +16,11 @@ describe("/automations", () => { afterAll(setup.afterAll) - beforeAll(async () => { + // For some reason this cannot be a beforeAll or the test "tests the automation successfully" fail + beforeEach(async () => { await config.init() }) - beforeEach(() => { - jest.clearAllMocks() - }) - describe("get definitions", () => { it("returns a list of definitions for actions", async () => { const res = await request @@ -123,10 +120,6 @@ describe("/automations", () => { }) describe("test", () => { - beforeEach(async () => { - await config.init() - }) - it("tests the automation successfully", async () => { let table = await config.createTable() let automation = newAutomation()