chore: Move factories and helpers to a better place (#4551)
* chore: Move factories and helpers to a better place * align factory product variant * fix factory cart * add simple store fac * fix tests * fix tests * fix * fix cart seeder
This commit is contained in:
committed by
GitHub
parent
26e2f81c24
commit
4d326fbbdf
26
integration-tests/environment-helpers/bootstrap-app.js
vendored
Normal file
26
integration-tests/environment-helpers/bootstrap-app.js
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
const path = require("path")
|
||||
const express = require("express")
|
||||
const getPort = require("get-port")
|
||||
|
||||
module.exports = {
|
||||
bootstrapApp: async ({ cwd } = {}) => {
|
||||
const app = express()
|
||||
|
||||
const loaders = require("@medusajs/medusa/dist/loaders").default
|
||||
|
||||
const { container, dbConnection } = await loaders({
|
||||
directory: path.resolve(cwd || process.cwd()),
|
||||
expressApp: app,
|
||||
isTest: false,
|
||||
})
|
||||
|
||||
const PORT = await getPort()
|
||||
|
||||
return {
|
||||
container,
|
||||
db: dbConnection,
|
||||
app,
|
||||
port: PORT,
|
||||
}
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user