const money=require("../../app/services/pricing/money");const inventory=require("../../app/services/inventory/inventory.service"); describe("Phase 5 decimal and availability rules",()=>{test("money remains integer-scaled and floors discounts at zero",()=>{expect(money.parse("900.05")).toBe(90005n);expect(money.percentOff("1000.00","12.50")).toBe("125.00");expect(money.subtractFloor("5.00","10.00")).toBe("0.00");});test.each([[{on_hand:10,reserved:1,low_stock_threshold:2},"IN_STOCK"],[{on_hand:3,reserved:1,low_stock_threshold:2},"LOW_STOCK"],[{on_hand:3,reserved:3,low_stock_threshold:2},"OUT_OF_STOCK"]])("availability projection",(balance,status)=>expect(inventory.availabilityStatus(balance)).toBe(status));test("reservation TTL is centralized",()=>expect(inventory.ttlMinutes()).toBeGreaterThan(0));});