I am trying to learn TDD with the node. I have hit this issue with expresso where the My app looks like this: and my test: } p> div> Try typing your test like this And when all tests are completed, the test runner should finish himself: p> expresso command is hanging, I think due to redis-server, by eliminating the process with
ctrl + c Finally, I'm getting the output (100% of 3 exams pass).
expresso hang the command, and what can I do about it?
// module dependency requires var auth = ('connect-at'), RedisStore = is required ( 'Connect-radis'); Var Express = Required ('Express'); Var app = module.exports = express.createServer (); // configuration app Configuration (function () (app.cset ('visual', __dirname + '/ views'); app.set ('visual engine', 'z'); app.ewesen (express.bodyParser); ap. Express.MathOrrayide ()); App Uses (ExxcookiePaper ()); App Use (Express Season ({Store: New Radisson Store, Mystery: "Secret Goes Here"}); app .use (app.router ); Application Uses (Express. Static (__DERNAM + '/ Public'));); App.configure ('development', function () {app.use (express.errorHandler) ({dump exception: true, show stack: true});}); App.configure ('output', function () {app.use (express.errorHandler ());}); // root.ap.get ('/ login', function (rick, 'r', 'r' Rs) {res.render ('user / login', {title: 'login'})}}; app.get ('/ register', function (req, res) {res.render ('user / login' , {Title: 'register'});}); // Listen to only $ node app.js (! Module parent) {app.listen (3000); Console.log ("listening on the express server port port "; App.address () .ports);}
'gET /': function (done) {assert.response (app, {url: '/'}, {Status: 200, Header: {'content-type': 'text / html; charset = UTF-8'}}, function (race) {assert.includes (res.body, 'title> title & gt; arcstadt & Lt; / title & gt; '); done ();}); Code> pre> div> html>
Comments
Post a Comment