HF RL Explorer

receipt printing: add test

receipt printing: add test: a task in smol-software-harbor (Harbor dataset). Add tests to test/receipt.test.js that pin down line() for amounts: a negative amount (a refund of 250 cents prints -2.50 ), an amount of 0 ( 0.00 ) and a large amount ( 123456 cents prints 1234.56 ), each line exactly…

The task

Add tests to `test/receipt.test.js` that pin down `line()` for amounts: a negative amount (a refund of 250 cents prints `-2.50`), an amount of 0 (`0.00`) and a large amount (`123456` cents prints `1234.56`), each line exactly `WIDTH` characters with the amount at the right edge. Do not change `src/receipt.js`; keep…

Part of efederici/smol-software-harbor.