Operator review
Checkout validation.
Read the change, inspect the checks, and record a review decision.
checkout.ts · proposed change
export function validateQuantity(value: number) {
- return value > 0;
+ return Number.isInteger(value) && value > 0 && value <= 99;
}
+ test("rejects fractional and excessive quantities", () => {
+ expect(validateQuantity(1.5)).toBe(false);
+ expect(validateQuantity(100)).toBe(false);
+ });Validation & decision
Unit tests12 passed
Type checkingPassed
Files changed2
Awaiting review