diff --git a/packages/server/src/api/routes/tests/automation.spec.ts b/packages/server/src/api/routes/tests/automation.spec.ts index 1591412735..c9bc940ff3 100644 --- a/packages/server/src/api/routes/tests/automation.spec.ts +++ b/packages/server/src/api/routes/tests/automation.spec.ts @@ -290,8 +290,7 @@ describe("/automations", () => { await setup.delay(500) let elements = await getAllTableRows(config) // don't test it unless there are values to test - if (elements.length > 1) { - expect(elements.length).toBeGreaterThanOrEqual(MAX_RETRIES) + if (elements.length >= 1) { expect(elements[0].name).toEqual("Test") expect(elements[0].description).toEqual("TEST") return diff --git a/packages/server/src/automations/tests/steps/loop.spec.ts b/packages/server/src/automations/tests/steps/loop.spec.ts index 2169c6157b..e23aabef49 100644 --- a/packages/server/src/automations/tests/steps/loop.spec.ts +++ b/packages/server/src/automations/tests/steps/loop.spec.ts @@ -1,4 +1,3 @@ -import * as automation from "../../index" import { basicTable } from "../../../tests/utilities/structures" import { Table, @@ -13,26 +12,20 @@ import { createAutomationBuilder } from "../utilities/AutomationTestBuilder" import TestConfiguration from "../../../tests/utilities/TestConfiguration" describe("Attempt to run a basic loop automation", () => { - let config: TestConfiguration + const config = new TestConfiguration() let table: Table beforeAll(async () => { - await automation.init() + await config.init() }) beforeEach(async () => { - config = new TestConfiguration() - await config.init() - table = await config.api.table.save(basicTable()) await config.api.row.save(table._id!, {}) }) - afterEach(async () => { - config.end() - }) afterAll(async () => { - await automation.shutdown() + config.end() }) it("attempt to run a basic loop", async () => {