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
2022-08-25 03:36:24 -03:00
committed by GitHub
parent 5a964e6439
commit ffd6234356
50 changed files with 1038 additions and 1619 deletions

View File

@@ -28,13 +28,8 @@ describe("/admin/customers", () => {
describe("GET /admin/customers", () => {
beforeEach(async () => {
try {
await adminSeeder(dbConnection)
await customerSeeder(dbConnection)
} catch (err) {
console.log(err)
throw err
}
await adminSeeder(dbConnection)
await customerSeeder(dbConnection)
})
afterEach(async () => {
@@ -164,12 +159,7 @@ describe("/admin/customers", () => {
describe("POST /admin/customers", () => {
beforeEach(async () => {
try {
await adminSeeder(dbConnection)
} catch (err) {
console.log(err)
throw err
}
await adminSeeder(dbConnection)
})
afterEach(async () => {
@@ -213,13 +203,8 @@ describe("/admin/customers", () => {
describe("POST /admin/customers/:id", () => {
beforeEach(async () => {
try {
await adminSeeder(dbConnection)
await customerSeeder(dbConnection)
} catch (err) {
console.log(err)
throw err
}
await adminSeeder(dbConnection)
await customerSeeder(dbConnection)
})
afterEach(async () => {
@@ -368,13 +353,8 @@ describe("/admin/customers", () => {
describe("GET /admin/customers/:id", () => {
beforeEach(async () => {
try {
await adminSeeder(dbConnection)
await customerSeeder(dbConnection)
} catch (err) {
console.log(err)
throw err
}
await adminSeeder(dbConnection)
await customerSeeder(dbConnection)
})
afterEach(async () => {