Download this repository | Report A Bug | Fork It
- The Project Brief
- Project Specific
- Tools & Tech
- Setup & Use
- Contributions, Issues and Forking
- Creators
- Show Your Support!
This project purpose was to learn the basics of Jest Testing by completing 5 different challenges
This is a project to be included by all students at Microverse as part of the Javascript module.
Having just read about testing in Javascript in this project we learn how to implement our reading in the form of Jest testing. In this project we all given the objective to create five functions and create five separate test scripts for those functions, these functions include:
- Capitalise: Capitalises a string
- Reverse string: Reverses a string (amazing!)
- Calculator: Returns an object with the basic operations add, subtract, multiply, divide
- Caesar-cypher: Takes a string and shifts letters up by the given number
- Array analysis: Takes an array of numbers and returns an object with average, min, max, and length.
Languages & Frameworks
- Javascript
- Jest testing library 26.6.1
Package Management
- NPM
Linters & Quality Control
-
Time to ensure you've got Node and NPM installed. If you do, skip this step. Otherwise, head on over to nodejs's website to download node with npm.
-
Time to go back to the project! Open your terminal (either in your text editor or otherwise) and 'cd' (i.e. navigate) to the root of this repo.
-
Time to install Webpack! Ensuring you're at this repo's root, enter the following command into your terminal. This will install webpack locally (to this project only):
npm install --save-dev webpack
-
Finally, once webpack has installed successfully, run the following command to install all of the projects dependencies:
npm install
There are a few commands that you can use interact with the project:
$npm run test
- This will indicate jest to find your .test.js files and run the tests.$npm run jest-watch
- This will dynamically run tests so that any updates (on save) will be retested by Jest automatically.
Contributions, issues and feature requests are more than welcome!
If you have any problems running or setting up this project, please submit it as a bug on the issues page right away!
If you want to make your own changes, modifications or improvements, go ahead and Fork it!
- Fork it
- Create your working branch (git checkout -b [choose-a-name])
- Commit your changes (git commit -am 'what this commit will fix/add/improve')
- Push to the branch (git push origin [chosen-name])
- Create a new Pull Request
Alexis Sanchez - Github
Rory Hellier - Github
Give a โญ๏ธ if you like this project!