Refactored app.js test