Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update track-sale.test.ts

Kiran K4cc879984845
diff --git a/apps/web/tests/tracks/track-sale.test.ts b/apps/web/tests/tracks/track-sale.test.ts
index de66b7bba3..1d49a36195 100644
--- a/apps/web/tests/tracks/track-sale.test.ts
+++ b/apps/web/tests/tracks/track-sale.test.ts
@@ -118,4 +118,27 @@ describe("POST /track/sale", async () => {
expectValidSaleResponse(response4, newSale);
});
+
+ test("track a sale with JPY currency (zero decimal currency)", async () => {
+ const jpySale = {
+ ...sale,
+ invoiceId: `INV_${randomId()}`,
+ amount: 65,
+ currency: "jpy",
+ };
+
+ const response = await http.post<TrackSaleResponse>({
+ path: "/track/sale",
+ body: {
+ ...jpySale,
+ externalId: E2E_CUSTOMER_EXTERNAL_ID,
+ },
+ });
+
+ expectValidSaleResponse(response, {
+ ...jpySale,
+ // amount: 6500,
+ currency: "usd",
+ });
+ });
});