A responsive currency converter app built with React that allows users to convert amounts from one currency to another using real-time exchange rates. This project demonstrates the use of React for UI development, Fetch API for data fetching, and includes unit, integration, and end-to-end testing examples.
## Features
- **Real-time currency conversion** using the Exchange Rates API.
- **User-friendly interface** with bright colors and clean design.
- **Responsive layout** optimized for all screen sizes.
- **Supports multiple currencies**.
## Live Demo
Check out the live version here: [Currency Converter Live](https://your-live-demo-link.com)
## Technologies Used
- **React** for building the user interface.
- **Fetch API** for fetching currency exchange rates.
- **Jest** and **React Testing Library** for unit and integration testing.
- **CSS** for responsive and vibrant styling.
## Installation
1. Clone the repository:
```bash
git clone https://github.com/your-username/currency-converter.git
```- Navigate to the project folder:
cd currency-converter - Install dependencies:
npm install
- Replace
YOUR_API_KEYinConverter.jswith your actual API key from the Exchange Rates API.
-
Run the development server:
npm start
-
Open http://localhost:3000 to view it in the browser.
-
Enter an amount, select the source and target currencies, and click Convert to see the converted value.
The project includes tests to ensure functionality:
- Unit Tests: Test functions handling currency conversion calculations, API request formatting, and data validation.
- Integration Tests: Verify that API responses are displayed correctly in the app.
- End-to-End Tests: Simulate the entire conversion workflow to ensure the app functions as expected.
To run the tests:
npm testHappy converting!
Replace `https://your-live-demo-link.com`.