Convert unit test over to server.js