Moving stripe import to top of test file

This commit is contained in:
Mitch-Budibase 2023-11-01 15:18:20 +00:00
parent 84079450f9
commit 85325814d0
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,7 @@
import TestConfiguration from "../../config/TestConfiguration" import TestConfiguration from "../../config/TestConfiguration"
import * as fixtures from "../../fixtures" import * as fixtures from "../../fixtures"
import { Hosting, PlanType } from "@budibase/types" import { Hosting, PlanType } from "@budibase/types"
const stripe = require("stripe")(process.env.STRIPE_SECRET_KEY)
describe("license management", () => { describe("license management", () => {
const config = new TestConfiguration() const config = new TestConfiguration()
@ -53,7 +54,6 @@ describe("license management", () => {
expect(checkoutSessionUrl).toContain("checkout.stripe.com") expect(checkoutSessionUrl).toContain("checkout.stripe.com")
// Create stripe customer // Create stripe customer
const stripe = require("stripe")(process.env.STRIPE_SECRET_KEY)
const customer = await stripe.customers.create({ const customer = await stripe.customers.create({
email: createAccountRequest.email, email: createAccountRequest.email,
}) })