chore(integration): throw errors on catch blocks (#2091)

Why:
Suppressing errors and not failing the execution will lead to misleading errors of the following tests.

Fixes CORE-461
This commit is contained in:
Carlos R. L. Rodrigues authored and GitHub committed 2022-08-25 06:36:24 +00:00
1 parent 5a964e6439
commit ffd6234356
50 files changed
+1038 -1619

No files matched your search

+16 -20
View File
@@ -5,30 +5,26 @@ const importFrom = require("import-from")
module.exports = {
bootstrapApp: async ({ cwd } = {}) => {
try {
const app = express()
const app = express()
const loaders = importFrom(
cwd || process.cwd(),
"@medusajs/medusa/dist/loaders"
).default
const loaders = importFrom(
cwd || process.cwd(),
"@medusajs/medusa/dist/loaders"
).default
const { container, dbConnection } = await loaders({
directory: path.resolve(cwd || process.cwd()),
expressApp: app,
isTest: false,
})
const { container, dbConnection } = await loaders({
directory: path.resolve(cwd || process.cwd()),
expressApp: app,
isTest: false,
})
const PORT = await getPort()
const PORT = await getPort()
return {
container,
db: dbConnection,
app,
port: PORT,
}
} catch (e) {
console.log(e)
return {
container,
db: dbConnection,
app,
port: PORT,
}
},
}