A simple sweet shop management system for a sweet shop built with React, JavaScript, and tested using Jest following Test-Driven Development (TDD) principles.
- View sweets from inventory
- Sweet logic handled by a separate
SweetShopServiceclass - Fully tested with Jest
- Modular React components
- Clean Git commit history with TDD-style commits
sweet-shop-react/ βββ public/ βββ src/ β βββ App.jsx β βββ SweetShopService.js β βββ components/ β β βββ SweetList.jsx β βββ index.js βββ tests/ β βββ SweetShopService.test.js βββ jest.config.js βββ README.md
git clone https://github.com/YOUR_USERNAME/sweet-shop-react.git
cd sweet-shop-kata
npm install
βΆοΈ Running the Application
npm start
This starts the app at http://localhost:3000.
Click the "View All Sweets" button to display the sweets in stock.
Running Tests
npm test
Sample Sweet Data
| ID | Name | Category | Price | Quantity |
| -- | ----------- | ---------- | ----- | -------- |
| 1 | Kaju Katli | Nut-Based | 50 | 20 |
| 2 | Gulab Jamun | Milk-Based | 10 | 15 |
π License
This project is open source and available under the MIT License.
π€ Author
Vishal Dave
M.E. β Information Technology, LD College of Engineeringο»Ώ