Created
October 26, 2011 08:00
-
-
Save davidbanham/1315746 to your computer and use it in GitHub Desktop.
Battling with expresso
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var server = require('../server'), | |
assert = require('assert'); | |
module.exports = { | |
'GET /': function(done){ | |
assert.response(server, | |
{ url: '/login' }, | |
{ status: 200, headers: { 'Content-Type': 'text/html; charset=utf-8' }}, | |
function(res){ | |
assert.includes(res.body, '<body id="login_page">'); | |
done(); | |
}); | |
} | |
} | |
Output is: | |
foo.test.js GET /: TypeError: Object #<Object> has no method 'listen' | |
at Object.response (/usr/local/lib/node_modules/expresso/bin/expresso:424:16) | |
at Test.fn (/Users/davidbanham/repos/oim-cpanel/test/foo.test.js:6:10) | |
at Test.runParallel (/usr/local/lib/node_modules/expresso/bin/expresso:959:10) | |
at Test.run (/usr/local/lib/node_modules/expresso/bin/expresso:924:18) | |
at next (/usr/local/lib/node_modules/expresso/bin/expresso:867:22) | |
at runSuite (/usr/local/lib/node_modules/expresso/bin/expresso:875:6) | |
at check (/usr/local/lib/node_modules/expresso/bin/expresso:814:12) | |
at runFile (/usr/local/lib/node_modules/expresso/bin/expresso:819:6) | |
at Array.forEach (native) | |
at runFiles (/usr/local/lib/node_modules/expresso/bin/expresso:796:15) | |
foo.test.js GET /: Error: Response not completed: GET /. | |
at Object.response (/usr/local/lib/node_modules/expresso/bin/expresso:400:17) | |
at Test.fn (/Users/davidbanham/repos/oim-cpanel/test/foo.test.js:6:10) | |
at Test.runParallel (/usr/local/lib/node_modules/expresso/bin/expresso:959:10) | |
at Test.run (/usr/local/lib/node_modules/expresso/bin/expresso:924:18) | |
at next (/usr/local/lib/node_modules/expresso/bin/expresso:867:22) | |
at runSuite (/usr/local/lib/node_modules/expresso/bin/expresso:875:6) | |
at check (/usr/local/lib/node_modules/expresso/bin/expresso:814:12) | |
at runFile (/usr/local/lib/node_modules/expresso/bin/expresso:819:6) | |
at Array.forEach (native) | |
at runFiles (/usr/local/lib/node_modules/expresso/bin/expresso:796:15) | |
info: Connected to MySQL | |
info: Database Selected | |
^C | |
Failures: 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment