- Fork and clone the repo
- Run
npm install
The exercises are split into three folders: A-pass-tests, B-write-tests and C-TDD
To run the tests from the terminal, run the command npm test.
To keep the tests running (auto updating when you save files), run the command: npm test -- --watch then press a to run all the tests and keep watching the files for changes. To quit the tests, type q.
To run a specifc test, run npm test <filname> for example npm test remove-vowels (that will run only the files that matches remove-vowels, i.e. remove-vowels.test.js)
The first set of exercises involve a set of tests that we will write code to make it pass. You can run only the tests in the A-pass-tests folder by running npm test A-pass-tests or you can run them with a watch with npm test A-pass-tests --watch.
The second set of exercises involve implemented code that we will add tests for. You can run only the tests in the B-write-tests folder by running npm test B-write-tests or you can run them with a watch with npm test B-write-tests --watch.
Think about edge cases while writing tests.
The final exercises involve using TDD to implement functions. You can run only the tests in the C-TDD folder by running npm test C-TDD or you can run them with a watch with npm test C-TDD --watch.
The solutions for this classwork can be found here:
https://github.com/CodeYourFuture/JavaScript-Core-3-Coursework-Week4-London8-Solution
This is a private repository. Please request access from your Teachers, Buddy or City Coordinator after the lesson.
- Complete the challenges and tests in each file and save it once you're happy with your changes
- Run the script to check the results against the tests - all of the exercises should have tests which PASS. If a test reads FAILED, find the associated test/code and fix it.
- Raise a PR once you're happy with the quality of your code