Skip to content

Commit

Permalink
Remove httpbin.org as a test dependency here. (#388)
Browse files Browse the repository at this point in the history
  • Loading branch information
monkpow committed Oct 25, 2018
1 parent c68f1b9 commit abf684c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/bodyEncoding.js
Expand Up @@ -141,16 +141,16 @@ describe('body encoding', function () {


describe('when user sets reqBodyEncoding', function () {
it('should set the accepts-charset header', function (done) {
it.only('should set the accepts-charset header', function (done) {
var app = express();
app.use(proxy('httpbin.org', {
app.use(proxy('localhost:8109', {
reqBodyEncoding: 'utf-16'
}));
request(app)
.get('/headers')
.end(function (err, res) {
if (err) { throw err; }
assert.equal(res.body.headers['Accept-Charset'], 'utf-16');
assert.equal(res.body.headers['accept-charset'], 'utf-16');
done(err);
});
});
Expand Down
4 changes: 4 additions & 0 deletions test/support/proxyTarget.js
Expand Up @@ -32,6 +32,10 @@ function proxyTarget(port, timeout, handlers) {
req.pipe(res);
});

target.use('/headers', function(req, res) {
res.json({ headers: req.headers });
});

target.use(function(err, req, res, next) {
res.send(err);
next();
Expand Down

0 comments on commit abf684c

Please sign in to comment.