Front End: React v.16.9.0, Semantic UI, CSS
Back End: N/a
Testing frameworks: Cypress, Enzyme
Deployed at: Netlify
This repository contains my individual RPS Game challenge from the Craft Academy Boot Camp. We were allowed to choose for ourselves which testing frameworks and libraries to use during this challenge and received no coach support. I chose to take on this challenge with very little previous knowledge of React before creating this app, as well as no previous experience of the testing frameworks or sinon.
- React
- Enzyme
- Cypress
- Sinon
- Yarn
To test this application you need to fork it to your own GitHub account and clone it to your local workspace.
To install all of the dependencies:
$ yarn install
To run the unit tests:
$ yarn test
To start cypress and run the feature tests:
$ yarn run cypress:open
To start the application and run it on your local host:
$ yarn start
When you run the app, you will be presented with the rules of the game. Click on the appropriate icon to pick your choice of weapon and the game will automatically return the computer's choice and declare a winner. The results are timed and will disappear within four seconds.
The scoreboard is reset manually by clicking the reset button.
When time given, I plan to refactor my code.
This project is under the MIT-license.
- Thank you Craft Academy for giving me this assignment.
- The icons are from Game-icons.net.
- The background image is from Pexels.
- How to stub a random game functionality was found at Stack Owerflow.
- The tests using Jest, in the first commits of the development branch, are from Learn TDD in React. The only purpose of these was to learn how to test components in React before moving forward with my own app.
As a User
In order to play the Rock, Paper, Scissors game
I want to be able to choose a weapon
As a User
When I play the game
I want to play against a computer
As a User
When I play against the computer
I want to know which one of us won the game
As a User
In order to fully enjoy this game
I wish to keep track of my wins and losses