Tidying up unit tests

Responding to report from jshint