Unit Testing Assignment for Sync Debrief
-
Select one group member to be the coder for the group, the coder will follow the following instructions with the help of the group:
- FORK this repository onto your github
- Copy the https URL from your FORKED repo
- Navigate to Git Bash on your local machine and
cd
to a place you wish to clone this activity to work on it - Once where you need to be in bash, run
git clone
followed by the URL you copied from your forked copy of this github repository - Open VSCode, select
File
in the top right, and selectOpen Folder
- Find the folder you cloned named
gen-testing-debrief
and open it, then familiarize yourself with the code first inmathfxns.js
. Read the comments in the class definition to figure out what each method is meant to do, and move to thetests
folder and come up with some simple tests inmathfxns.test.js
to find errors, oversights, or bugs in the source code! Don't forget to run the following bash command to install the mocha and chai packages before running tests:
npm i
-
Work together to add appropiate tests for this activity, one by one. If you get stuck, don't forget to use your Google-Fu and problem solving skills. TA's will be hopping into each room to check in, message one of us on Slack for specific help.
-
Ask yourselves the following questions. What types of input will cause problems in the methods? Do they handle invalid input appropriately? Do they throw a descriptive error upon invalid input? Upon valid input, does the method work as expected (i.e. does the method produce the expected result)?
-
When your team is finished with the activity, submit a pull request from your fork!
-
At the end of the allotted time, we will go over this exercise step by step. Group members are expected to raise their hands and guide the class through each solution.