ebirving / sundial

WDI Homework (Week 8) [javascript, jasmine, tdd]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clock Hands: TDD Edition

Write a function that given the time of the day in hours and minutes returns the angle between the hands on a clock.

You must take a TDD approach to this assignment. Create a test before writing the corresponding code.

  • You must implement at least three different tests.
  • Think about the different cases your function will need to handle. Create a test for each of them.

Notes:

  • It should give a positive angle and return the smaller one (ie less than 180 degrees).
  • You can assume that the clock only moves once each minute on the minute to update its hands.

About

WDI Homework (Week 8) [javascript, jasmine, tdd]


Languages

Language:JavaScript 94.5%Language:CSS 4.7%Language:HTML 0.9%