Chore/integration tests modules utils (#6581)
new wrapper for medusa integration tests. for now it is only applied to the modules directory, but it could be used in the api integration tests or any other integrations that requires a db and a server up and running. It is not perfect, but I wanted to have something working and centralised before improving it, also avoiding too many conflicts with other prs
This commit is contained in:
committed by
GitHub
parent
a6736c7ee0
commit
51bb6f1e89
@@ -4,9 +4,13 @@ import jwt from "jsonwebtoken"
|
||||
import { getContainer } from "../../environment-helpers/use-container"
|
||||
import adminSeeder from "../../helpers/admin-seeder"
|
||||
|
||||
export const createAdminUser = async (dbConnection, adminHeaders) => {
|
||||
export const createAdminUser = async (
|
||||
dbConnection,
|
||||
adminHeaders,
|
||||
container?
|
||||
) => {
|
||||
await adminSeeder(dbConnection)
|
||||
const appContainer = getContainer()!
|
||||
const appContainer = container ?? getContainer()!
|
||||
|
||||
const authModule: IAuthModuleService = appContainer.resolve(
|
||||
ModuleRegistrationName.AUTH
|
||||
|
||||
Reference in New Issue
Block a user