Fix javascript tests

Looks like tests were broken about week ago by a syntax error in `test/javascripts/unit/closed-organisation-hide-date_test.js`, but phantomjs still returned an exit code of 0. Fixed both the test and phantomjs to report syntax errors.