chore(integration-tests): Add jest timeout to workflow tests (#5401)

This commit is contained in:
Oli Juhl
2023-10-18 08:45:50 +02:00
committed by GitHub
parent fc01375a8d
commit 9c362f7214
2 changed files with 16 additions and 18 deletions

View File

@@ -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 () => {

View File

@@ -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 () => {