From 9c362f7214f4c0907b66c95d81ed766aba0ec0ff Mon Sep 17 00:00:00 2001 From: Oli Juhl <59018053+olivermrbl@users.noreply.github.com> Date: Wed, 18 Oct 2023 08:45:50 +0200 Subject: [PATCH] chore(integration-tests): Add jest timeout to workflow tests (#5401) --- .../inventory/create-inventory-items.ts | 17 ++++++++--------- .../workflows/product/create-product.ts | 17 ++++++++--------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/integration-tests/plugins/__tests__/workflows/inventory/create-inventory-items.ts b/integration-tests/plugins/__tests__/workflows/inventory/create-inventory-items.ts index a6d1452599..02fdb14ae3 100644 --- a/integration-tests/plugins/__tests__/workflows/inventory/create-inventory-items.ts +++ b/integration-tests/plugins/__tests__/workflows/inventory/create-inventory-items.ts @@ -1,16 +1,17 @@ -import path from "path" -import { initDb, useDb } from "../../../../environment-helpers/use-db" -import { bootstrapApp } from "../../../../environment-helpers/bootstrap-app" +import { ModuleRegistrationName } from "@medusajs/modules-sdk" +import { IInventoryService, WorkflowTypes } from "@medusajs/types" import { - createInventoryItems, CreateInventoryItemActions, + createInventoryItems, pipe, } from "@medusajs/workflows" -import { IInventoryService, WorkflowTypes } from "@medusajs/types" -import { ModuleRegistrationName } from "@medusajs/modules-sdk" +import path from "path" +import { bootstrapApp } from "../../../../environment-helpers/bootstrap-app" +import { initDb, useDb } from "../../../../environment-helpers/use-db" + +jest.setTimeout(30000) describe("CreateInventoryItem workflow", function () { - let medusaProcess let medusaContainer beforeAll(async () => { @@ -23,8 +24,6 @@ describe("CreateInventoryItem workflow", function () { afterAll(async () => { const db = useDb() await db.shutdown() - - medusaProcess.kill() }) it("should compensate all the invoke if something fails", async () => { diff --git a/integration-tests/plugins/__tests__/workflows/product/create-product.ts b/integration-tests/plugins/__tests__/workflows/product/create-product.ts index dc97010f41..fb02d8e16b 100644 --- a/integration-tests/plugins/__tests__/workflows/product/create-product.ts +++ b/integration-tests/plugins/__tests__/workflows/product/create-product.ts @@ -1,17 +1,18 @@ -import path from "path" -import { initDb, useDb } from "../../../../environment-helpers/use-db" -import { bootstrapApp } from "../../../../environment-helpers/bootstrap-app" +import { ModuleRegistrationName } from "@medusajs/modules-sdk" +import { IProductModuleService, WorkflowTypes } from "@medusajs/types" import { - createProducts, CreateProductsActions, Handlers, + createProducts, pipe, } from "@medusajs/workflows" -import { IProductModuleService, WorkflowTypes } from "@medusajs/types" -import { ModuleRegistrationName } from "@medusajs/modules-sdk" +import path from "path" +import { bootstrapApp } from "../../../../environment-helpers/bootstrap-app" +import { initDb, useDb } from "../../../../environment-helpers/use-db" + +jest.setTimeout(30000) describe("CreateProduct workflow", function () { - let medusaProcess let medusaContainer beforeAll(async () => { @@ -24,8 +25,6 @@ describe("CreateProduct workflow", function () { afterAll(async () => { const db = useDb() await db.shutdown() - - medusaProcess.kill() }) it("should compensate all the invoke if something fails", async () => {