Skip to content

Miss-nonso/Jest-writing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Currency Converter

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
   ```
  1. Navigate to the project folder:
    cd currency-converter
  2. Install dependencies:
    npm install
  3. Replace YOUR_API_KEY in Converter.js with your actual API key from the Exchange Rates API.

Usage

  1. Run the development server:

    npm start
  2. Open http://localhost:3000 to view it in the browser.

  3. Enter an amount, select the source and target currencies, and click Convert to see the converted value.

Testing

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 test

Happy converting!


Replace `https://your-live-demo-link.com`.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors