fix(core, medusa-test-utils): Fix medusa test runner plugin modules loading (#12753)
This commit is contained in:
1 parent
5317f16d54
commit
9bdd5429af
2 files changed
+14
-5
No files matched your search
@@ -3,6 +3,8 @@ import { MedusaContainer } from "@medusajs/framework/types"
|
||||
import {
|
||||
ContainerRegistrationKeys,
|
||||
createMedusaContainer,
|
||||
getResolvedPlugins,
|
||||
mergePluginModules,
|
||||
} from "@medusajs/framework/utils"
|
||||
import { asValue } from "awilix"
|
||||
import { logger } from "@medusajs/framework/logger"
|
||||
@@ -141,6 +143,13 @@ class MedusaTestRunner {
|
||||
const { container, MedusaAppLoader } = await import("@medusajs/framework")
|
||||
const appLoader = new MedusaAppLoader()
|
||||
|
||||
// Load plugins modules
|
||||
const configModule = container.resolve(
|
||||
ContainerRegistrationKeys.CONFIG_MODULE
|
||||
)
|
||||
const plugins = await getResolvedPlugins(this.cwd, configModule)
|
||||
mergePluginModules(configModule, plugins)
|
||||
|
||||
container.register({
|
||||
[ContainerRegistrationKeys.LOGGER]: asValue(logger),
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user