Skip to content

Commit

Permalink
Added tests for StripeService
Browse files Browse the repository at this point in the history
  • Loading branch information
asun555 committed Mar 29, 2024
1 parent dff48de commit 38aeb4e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions server/src/business-layer/services/StripeService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
)
Expand All @@ -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)
})

})

0 comments on commit 38aeb4e

Please sign in to comment.