feat(modules-sdk, types, user, utils):init user module events (#6431)

* init user module events

* refactor utils

* undo test script update

* fix feedback

* add eventbus service to module test-runner

* add injected dependencies

* move events to utils

* use const eventname in tests

* rm withTransaction
This commit is contained in:
Philip Korsholm
2024-02-23 09:31:02 +08:00
committed by GitHub
parent 36a61658f9
commit 3fc2aea752
19 changed files with 289 additions and 11 deletions
@@ -1,6 +1,7 @@
import { Modules, ModulesDefinition } from "@medusajs/modules-sdk"
import { DB_URL } from "./database"
import { MockEventBusService } from "medusa-test-utils"
export function getInitModuleConfig() {
const moduleOptions = {
@@ -13,7 +14,9 @@ export function getInitModuleConfig() {
jwt_secret: "test",
}
const injectedDependencies = {}
const injectedDependencies = {
eventBusModuleService: new MockEventBusService(),
}
const modulesConfig_ = {
[Modules.USER]: {