Fix startup.spec.ts's reliance on the node-fetch mock.
This commit is contained in:
parent
b39875fb4b
commit
661e1f241d
|
@ -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 () => {
|
||||
|
|
Loading…
Reference in New Issue