Skip to content

Commit add0285

Browse files
committed
Update track-sale.test.ts
1 parent 01b5a55 commit add0285

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

apps/web/tests/tracks/track-sale.test.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,20 @@ describe("POST /track/sale", async () => {
102102
});
103103

104104
test("track a sale with `customerId` (backward compatibility)", async () => {
105+
const newSale = {
106+
...sale,
107+
invoiceId: `INV_${randomId()}`,
108+
amount: randomSaleAmount(),
109+
};
110+
105111
const response4 = await http.post<TrackSaleResponse>({
106112
path: "/track/sale",
107113
body: {
108-
...sale,
109-
invoiceId: `INV_${randomId()}`,
110-
amount: randomSaleAmount(),
114+
...newSale,
111115
customerId: E2E_CUSTOMER_EXTERNAL_ID,
112116
},
113117
});
114118

115-
expectValidSaleResponse(response4, sale);
119+
expectValidSaleResponse(response4, newSale);
116120
});
117121
});

0 commit comments

Comments
 (0)