Welcome to DiUS Computer Store Checkout System! This TypeScript implementation allows you to handle various pricing rules for a variety of products in our store. Whether it's a special deal on Apple TVs, a discount on Super iPads, or a free VGA adapter bundled with MacBook Pro purchases, our checkout system has you covered
Node.js(https://nodejs.org/en) installed on your machine.
- Clone the repository:
git clone https://github.com/your-username/checkout-system.git
- Navigate to the project directory:
cd checkout-system
- Install dependencies:
npm install
- Run Unit Tests
npm run test
-
Run Example Scenarios in local
Go to src directory
cd src
i. SKUs Scanned: atv, atv, atv, vga Total expected: $249.00
ts-node index.ts FirstExample
ii. SKUs Scanned: atv, ipd, ipd, atv, ipd, ipd, ipd Total expected: $2718.95
ts-node index.ts SecondExample
iii. SKUs Scanned: mbp, vga, ipd Total expected: $1949.98
ts-node index.ts ThirdExample