GithubHelp home page GithubHelp logo

testing-react's Introduction

Testing-React

In this project, you will demonstrate proficiency by writing unit tests for an existing React application. Your tests should verify the behavior listed in the Minimum Viable Product section.

Some of the topics covered were:

  • Testing a React application.
  • Using the @testing-library/react testing framework.
  • Testing asynchronous calls made inside your React application

Instructions

Read these requirements carefully. Understand exactly what is expected before starting.

You are allowed, and encouraged, to collaborate with your peers while working on this assignment. Remember to follow the twenty-minute rule and post questions to your cohort's help channel before seeking support from your PM and Instructor.

Commits

Please push your code often and use descriptive commit messages, this helps you and your project manager.

Project Description

In this project, you will write tests for an existing React application that queries data from the Star Wars API, and renders a list of Star Wars characters. The app also has buttons called Next and Previous to query the API again for the next or previous data sets. You will need to write tests for those buttons to ensure that they are working as expected.

Project Set Up

Follow these steps to setup your git fork and branch.

  • Fork this repository.
  • Use GitHub's website to add your project manager as collaborator on your fork.
  • Clone your forked version of the repository (Not Lambda's!).
  • Create a new branch: git checkout -b <firstName-lastName>.
  • Commit changes to your <firstName-lastName> branch.
  • Push often to your branch: git push origin <firstName-lastName>.

Follow these steps for completing your project.

  • Submit a Pull-Request to merge the <firstName-lastName> branch into the master branch on your fork. Please don't merge your own pull request
  • Use GitHub's website to add your project manager as a reviewer on the pull-request.
  • Your project manager will count the project as complete by merging the branch back into the master branch of your forked repository.

Note

The React app here was created with the latest version of create-react-app which now comes with @testing-library/react already included. When you create your own apps with the new CRA version, you won't need to add that library anymore!

Minimum Viable Product

Your job is to write tests to ensure that the application behaves as expected.

Stretch Problem

This section is optional and not counted towards MVP. Start working on it after you're done with the main assignment.

  • Add a dropdown that has values for these strings: 'people', 'planets', 'starships', 'vehicles', 'species'. When selected, the URL that is fetched will change to fetch the chosen data. Update your tests to test the dropdown input.

testing-react's People

Contributors

dustinmyers avatar dustinmyers111 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.