fix: allow integration tests to run from integration-test/api folder (#940)
This commit is contained in:
@@ -13,4 +13,6 @@ module.exports = {
|
||||
],
|
||||
transform: { "^.+\\.[jt]s$": `../../jest-transformer.js` },
|
||||
setupFilesAfterEnv: ["../setup.js"],
|
||||
globalSetup: "../globalSetup.js",
|
||||
globalTeardown: "../globalTeardown.js",
|
||||
}
|
||||
|
||||
@@ -16,18 +16,17 @@ const pgGodCredentials = {
|
||||
class DatabaseFactory {
|
||||
constructor() {
|
||||
this.connection_ = null
|
||||
this.masterConnectionName = "name"
|
||||
this.masterConnectionName = "master"
|
||||
this.templateDbName = "medusa-integration-template"
|
||||
}
|
||||
|
||||
async createTemplateDb_() {
|
||||
try {
|
||||
const cwd = path.resolve(path.join(__dirname, ".."))
|
||||
const connection = await this.getMasterConnection()
|
||||
|
||||
const migrationDir = path.resolve(
|
||||
path.join(
|
||||
process.cwd(),
|
||||
"integration-tests",
|
||||
cwd,
|
||||
"api",
|
||||
`node_modules`,
|
||||
`@medusajs`,
|
||||
|
||||
Reference in New Issue
Block a user