1
0
Fork 0
mirror of synced 2024-09-20 19:33:10 +12:00

Fix startup.spec.ts's reliance on the node-fetch mock.

This commit is contained in:
Sam Rose 2024-08-01 12:09:11 +01:00
parent b39875fb4b
commit 661e1f241d
No known key found for this signature in database

View file

@ -1,6 +1,7 @@
import TestConfiguration from "../../tests/utilities/TestConfiguration"
import { startup } from "../index"
import { users, utils, tenancy } from "@budibase/backend-core"
import nock from "nock"
describe("check BB_ADMIN environment variables", () => {
const config = new TestConfiguration()
@ -8,7 +9,17 @@ describe("check BB_ADMIN environment variables", () => {
await config.init()
})
beforeEach(() => {
nock.cleanAll()
})
it("should be able to create a user with the BB_ADMIN environment variables", async () => {
nock("http://localhost:10000")
.get("/api/global/configs/checklist")
.reply(200, {})
.get("/api/global/self/api_key")
.reply(200, {})
const EMAIL = "budibase@budibase.com",
PASSWORD = "budibase"
await tenancy.doInTenant(tenancy.DEFAULT_TENANT_ID, async () => {