Reject discount codes over 50%, with a test
Read 2 files, searched onceCodes are applied in src/cart.ts. I’ll check the size there.
Editedsrc/cart.ts+2 −1-const off = code.percent / 100+if (code.percent > 50) throw new InvalidCode(code.id)+const off = code.percent / 100
Editedsrc/cart.test.ts+4Ranpnpm test cart15 passed