This commit is contained in:
John Yeo
2026-03-17 11:09:05 +00:00
parent 417568403d
commit 90ee3cbbe7
2 changed files with 2 additions and 3 deletions

View File

@@ -616,7 +616,6 @@ test.concurrent(`${chalk.yellowBright("create-entity-paid: entity5 - payment fai
// Step 4: Try to track usage - should fail
await expectAutumnError({
errMessage: "card was declined.",
func: async () => {
return await autumnV1.track({
customer_id: customerId,

View File

@@ -83,13 +83,13 @@ describe("cleanTiersForMode", () => {
test("per_unit mode handles tiers that already have no flat_amount", () => {
const item = makeItem({
tiers: [makeTier({ to: 100, amount: 5, flat_amount: null })],
tiers: [makeTier({ to: 100, amount: 5 })],
});
const result = cleanTiersForMode({ item, mode: "per_unit" });
expect(result.tiers![0].amount).toBe(5);
expect(result.tiers![0].flat_amount).toBeNull();
expect(result.tiers![0].flat_amount).toBeUndefined();
});
test("does not mutate the original item", () => {