Topics:
- Unit Testing
Jest
Welcome to the wonderful world of automated testing, specifically unit testing. Whether this is immediately clear to you or not, you have already familiarized yourselves with this process, only, the tests have been written for you beforehand.
Now we start on the other side of the fence, where you have no tests, only working code. The goal of this sprint is to get you familiar with writing unit tests for JavaScript code.
- Use
yarn
to install the necessary dependencies from thepackage.json
file. - To run your tests run the command
yarn test
. - Get started by implementing the tests inside the
basic-javascript
directory then move ontoadvanced-javascript
when you're done.
Write tests inside the files ending on .spec.js
that check the code in the files that are imported into each spec file.