From 38aeb4ea415289342b935c5b60b20bb8146edea1 Mon Sep 17 00:00:00 2001 From: Albert Date: Fri, 29 Mar 2024 20:54:36 +1300 Subject: [PATCH] Added tests for StripeService --- .../business-layer/services/StripeService.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/src/business-layer/services/StripeService.test.ts b/server/src/business-layer/services/StripeService.test.ts index 79e88f016..caa4e5dfe 100644 --- a/server/src/business-layer/services/StripeService.test.ts +++ b/server/src/business-layer/services/StripeService.test.ts @@ -15,10 +15,9 @@ jest.mock("stripe", () => { starting_after?: string } const products = [] - for (let i=0; i < limit; ++i) { + for (let i = 0; i < limit; ++i) { products.push(productMock) } - }) jest @@ -28,8 +27,7 @@ jest.mock("stripe", () => { }) describe("Stripe service functionality", () => { - - it("should get a product with lookup key", async () => { + it("should get a product with lookup key", async () => { const result = await new StripeService().getProductsWithLookupKey( "random_lookupKey" ) @@ -47,8 +45,10 @@ describe("Stripe service functionality", () => { }) it("should get a product by metadata", async () => { - const result = await new StripeService().getProductByMetadata("random_key", "random_value") + const result = await new StripeService().getProductByMetadata( + "random_key", + "random_value" + ) expect(result).toEqual(productMock) }) - })