add mocha and tests for backend