mocha tests for front end