use environment variables in jest run
This commit is contained in:
parent
20ae838475
commit
943bd54879
|
@ -9,8 +9,8 @@
|
|||
"url": "https://github.com/Budibase/budibase.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jest --runInBand",
|
||||
"test:watch": "jest --watch",
|
||||
"test": "env-cmd jest --runInBand",
|
||||
"test:watch": "env-cmd jest --watch",
|
||||
"test:debug": "DEBUG=1 jest",
|
||||
"docker:up": "docker-compose up -d",
|
||||
"docker:down": "docker-compose down",
|
||||
|
@ -53,4 +53,4 @@
|
|||
"@budibase/backend-core": "^2.0.5",
|
||||
"node-fetch": "2"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -12,7 +12,6 @@ interface ApiOptions {
|
|||
class InternalAPIClient {
|
||||
host: string
|
||||
appId?: string
|
||||
csrfToken?: string
|
||||
cookie?: string
|
||||
|
||||
constructor(appId?: string) {
|
||||
|
|
|
@ -11,10 +11,8 @@ export default class AuthApi {
|
|||
async login(): Promise<[Response, any]> {
|
||||
const response = await this.api.post(`/global/auth/default/login`, {
|
||||
body: {
|
||||
// username: process.env.BB_ADMIN_USER_EMAIL,
|
||||
// password: process.env.BB_ADMIN_USER_PASSWORD
|
||||
username: "qa@budibase.com",
|
||||
password: "budibase"
|
||||
username: process.env.BB_ADMIN_USER_EMAIL,
|
||||
password: process.env.BB_ADMIN_USER_PASSWORD
|
||||
}
|
||||
})
|
||||
const cookie = response.headers.get("set-cookie")
|
||||
|
@ -23,6 +21,6 @@ export default class AuthApi {
|
|||
}
|
||||
|
||||
async logout(): Promise<any> {
|
||||
return this.api.post(`/global/auth/default/logout`)
|
||||
return this.api.post(`/global/auth/logout`)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue