This is a project that will help you define testing and fundamentals. THere is a JSON document that contains 36 random people and their profile information.
For this exercise to work to its fullest extent you will need to have the following installed:
- Node
- NPM
- Some form of IDE (preferrably VSCODE)
- Mocha
- Chai
If you want a challenge, set up a function that goes and gets the results from this api:
https://my.api.mockaroo.com/people.json?key=f656cb80
- Fork this repository.
- Clone it to your computer
- Open this folder and its contents within your favorite editor.
- Within the terminal run the following command
npm install
The above command will install thew two packages mocha and chai to your computer so you can test your functions going forward.
Test it out by running:
npm test
This runs all the tests within the test folder. Go ahead and open the arrays.text.js This currently just takes an array and returns the first index of the array using the getOne method on the arrays.js document.
If you are new to Node, check out the easyArrays.js file by running
node easyArrays.js
This will show the first index of the peoples array. Check out the file to see how to test these functions.