Skip to content

Commit

Permalink
add globalSetUp and globalTearDown
Browse files Browse the repository at this point in the history
  • Loading branch information
Idokah committed Jul 27, 2022
1 parent a24a35c commit 5f87f6f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion libs/external-db-testkit/src/lib/e2e_resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ export default class E2EResources {
this.supportedOperations = this.implementation.supportedOperations;
}

async globalSetUp() {
await this.initEnv()
await this.setUpDb()
await this.initApp()
}

async globalTeardown() {
await this.dbTeardown()
await this.shutdownEnv()
await this.teardownApp()
}

async initEnv() {
await this.implementation.initEnv()
await sleep(5000)
Expand Down Expand Up @@ -50,7 +62,7 @@ export default class E2EResources {
return this.env
}

async dbTeardown() {
async dbTeardown() {
await this.env.cleanup()
}

Expand Down

0 comments on commit 5f87f6f

Please sign in to comment.