1
0
Fork 0
mirror of synced 2024-06-29 11:31:06 +12:00
budibase/qa-core/src/config/internal-api/TestConfiguration/index.ts
2022-10-01 02:54:51 +01:00

25 lines
536 B
TypeScript

import ApplicationApi from "./applications"
import AuthApi from "./auth"
import InternalAPIClient from "./InternalAPIClient"
export default class TestConfiguration<T> {
applications: ApplicationApi
auth: AuthApi
context: T
constructor(apiClient: InternalAPIClient) {
this.applications = new ApplicationApi(apiClient)
this.auth = new AuthApi(apiClient)
this.context = <T>{}
}
async beforeAll() {
await this.auth.login()
}
async afterAll() {
this.context = <T>{}
await this.auth.logout()
}
}