chore: Update module test runner to support DmlEntities when needed (#7799)
* chore: Update module test runner to support DmlEntities when needed * update es version for core test utils * fix test * update swc config
This commit is contained in:
@@ -3,6 +3,7 @@ import { initModules, InitModulesOptions } from "./init-modules"
|
||||
|
||||
import { ContainerRegistrationKeys, ModulesSdkUtils } from "@medusajs/utils"
|
||||
import { MockEventBusService } from "."
|
||||
import { toMikroOrmEntities } from "@medusajs/utils/src"
|
||||
|
||||
export interface SuiteOptions<TService = unknown> {
|
||||
MikroOrmWrapper: TestDatabase
|
||||
@@ -41,7 +42,7 @@ export function moduleIntegrationTestRunner<TService = any>({
|
||||
process.env.LOG_LEVEL = "error"
|
||||
|
||||
moduleModels ??= Object.values(require(`${process.cwd()}/src/models`))
|
||||
// migrationPath ??= process.cwd() + "/src/migrations/!(*.d).{js,ts,cjs}"
|
||||
moduleModels = toMikroOrmEntities(moduleModels)
|
||||
|
||||
const tempName = parseInt(process.env.JEST_WORKER_ID || "1")
|
||||
const dbName = `medusa-${moduleName.toLowerCase()}-integration-${tempName}`
|
||||
|
||||
Reference in New Issue
Block a user