We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
var express = require('express'); var http = require('http'); var app = express(); app.use(function(req, res) {res.end('hello');}); app = http.createServer(app); module.exports = app;
var request = require('supertest'); var app = require('./app'); app.listen(12355); request(app).get('/').end(function(err, res) { console.log(err, res); });
in callback, res.text is undefined supertest @0.4.0 express @3.0.0rc5
res.text
undefined
But in supertest @0.1.2, everything is ok.
The text was updated successfully, but these errors were encountered:
in later superagents you have to do .buffer() if the response is not text/* or application/json
.buffer()
text/*
application/json
Sorry, something went wrong.
Oh. The render module forgot to add content-type. Thx
content-type
No branches or pull requests
in callback,
res.text
isundefined
supertest @0.4.0
express @3.0.0rc5
But in supertest @0.1.2, everything is ok.
The text was updated successfully, but these errors were encountered: