web shop checkout totals: edge case
web shop checkout totals: edge case: a task in smol-software-harbor (Harbor dataset). Customers type discount codes as save10 or SAVE10 and get no discount. Make discountCents in src/discounts.js ignore case and surrounding whitespace of the code; null or an empty code still gives 0. Run node…
The task
Customers type discount codes as `save10` or ` SAVE10 ` and get no discount. Make `discountCents` in `src/discounts.js` ignore case and surrounding whitespace of the code; `null` or an empty code still gives 0. Run `node --test test/*.test.js`.
Part of efederici/smol-software-harbor.