##TestFirst JavaScript Overview
For an introduction to Test-Driven Development, read the first three sections of The Newbie's Guide to Test-Driven Development ("What is Test-Driven Development?", "How does it work?", and "Great, but how is this better than regular testing?")
Let's warm up by learning to read tests and write code to match a test's expectations. Read more about the philosophy of Test-First Learning at TestFirst.org.
To start, we need to fork the repository and install testem
, a Node test-runner that will run your test and code.
- Fork the repository to your account. (If you're taking this assessment through LearnDot, there will be a button for this at the bottom of the page!)
- Go to your own repositories on GitHub and clone the TestFirst repository link. (LearnDot will also provide this link for you)
- Use the link in the
git clone
then follow the rest of the commands.
$ git clone https://github.com/awronka/test_first_part_two.git
$ cd test_first_part_two
$ npm install -g testem
The key skill here to practice is how to debug JavaScript inside Chrome. You should become comfortable with these methods:
- Using the
console
viaconsole.log
andconsole.dir
- Using
debugger
to step through your JS in the Chrome DevTools
This is a great blog post on the topic:
http://www.creativebloq.com/javascript/javascript-debugging-beginners-3122820 Permalink