Test javascript files using mocha

Also include the test in coverage measuring