Expose beforeall error
This commit is contained in:
parent
dd2a05fdcb
commit
9c04ae5f85
|
@ -135,16 +135,20 @@ class TestConfiguration {
|
||||||
// SETUP / TEARDOWN
|
// SETUP / TEARDOWN
|
||||||
|
|
||||||
async beforeAll() {
|
async beforeAll() {
|
||||||
this.#tenantId = `tenant-${utils.newid()}`
|
try {
|
||||||
|
this.#tenantId = `tenant-${utils.newid()}`
|
||||||
|
|
||||||
// Running tests in parallel causes issues creating the globaldb twice. This ensures the db is properly created before starting
|
// Running tests in parallel causes issues creating the globaldb twice. This ensures the db is properly created before starting
|
||||||
await retry(async () => await this.createDefaultUser())
|
await retry(async () => await this.createDefaultUser())
|
||||||
await this.createSession(this.defaultUser!)
|
await this.createSession(this.defaultUser!)
|
||||||
|
|
||||||
await tenancy.doInTenant(this.#tenantId, async () => {
|
await tenancy.doInTenant(this.#tenantId, async () => {
|
||||||
await this.createTenant1User()
|
await this.createTenant1User()
|
||||||
await this.createSession(this.tenant1User!)
|
await this.createSession(this.tenant1User!)
|
||||||
})
|
})
|
||||||
|
} catch (e: any) {
|
||||||
|
throw new Error(e.message)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async afterAll() {
|
async afterAll() {
|
||||||
|
|
Loading…
Reference in New Issue