Bradley Braithwaite
1 import {
2 Learning,
3 JavaScript,
4 AngularJS
5 } from 'Brad on Code.com'
6 |
Check out my online course: AngularJS Unit Testing in-depth with ngMock.

TDD Kata Video with Eclipse, JavaScript and QUnit

on
on javascript, tools, TDD, personal development

I wrote a blog post titled Unit Testing your JavaScript Code with QUnit and JS Test Driver in Eclipse and as a follow up to the post I planned to record a video of me performing a TDD Kata using the tools detailed in the blog. When I came to record the Kata, I ran into some show stopping issues I had not come across before with Eclipse or JS Test Driver. The eventual outcome was that I wrote my own test runner for QUnit and I recorded the Kata using Eclipse to demonstrate the test runner and how I was making use of the QUnit shortcut keys described in the post.

Why you should record yourself coding

Watching yourself code is like hearing yourself sing: you realise that you are not Stevie Wonder.

The initial thing I noticed is that I'm not as fast or as accurate at typing as I thought I was. I switched to the Apple mini wireless keyboard about a month ago and I'm not yet as fast as I was with my alternative Windows keyboard, which was the Microsoft Comfort Curve. I also noticed I use the arrow keys way to much and I should learn to make better use of the shortcut keys to go to the end of, or beginning of a line.

The Kata flows reasonably well however I take too many steps during the last test when asserting the exception message for negatives.

I would have liked to extract sections of the code into methods but due to an error I was seeing with Eclipse I was unable to.

Videos

Here are the recordings of me performing the TDD String Calculator Kata in JavaScript using:

  • Eclipse
  • QUnit
  • QUnit Test Runner
For quick viewing there is a video at 2x normal speed. The video is five minutes in length:

2x Speed

Here is the original recording which is 10 minutes in length:

Normal Speed

Kata at 2x Speed

SHARE
Don't miss out on the free technical content:

Subscribe to Updates

CONNECT WITH BRADLEY

Bradley Braithwaite Software Blog Bradley Braithwaite is a software engineer who works for search engine start-ups. He is a published author at pluralsight.com. He writes about software development practices, JavaScript, AngularJS and Node.js via his website . Find out more about Brad. Find him via:
You might also like:
mean stack tutorial AngularJS Testing - Unit Testing Tutorials