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