Skip to content

Commit abf684c

Browse files
authored
Remove httpbin.org as a test dependency here. (#388)
1 parent c68f1b9 commit abf684c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

test/bodyEncoding.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,16 +141,16 @@ describe('body encoding', function () {
141141

142142

143143
describe('when user sets reqBodyEncoding', function () {
144-
it('should set the accepts-charset header', function (done) {
144+
it.only('should set the accepts-charset header', function (done) {
145145
var app = express();
146-
app.use(proxy('httpbin.org', {
146+
app.use(proxy('localhost:8109', {
147147
reqBodyEncoding: 'utf-16'
148148
}));
149149
request(app)
150150
.get('/headers')
151151
.end(function (err, res) {
152152
if (err) { throw err; }
153-
assert.equal(res.body.headers['Accept-Charset'], 'utf-16');
153+
assert.equal(res.body.headers['accept-charset'], 'utf-16');
154154
done(err);
155155
});
156156
});

test/support/proxyTarget.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ function proxyTarget(port, timeout, handlers) {
3232
req.pipe(res);
3333
});
3434

35+
target.use('/headers', function(req, res) {
36+
res.json({ headers: req.headers });
37+
});
38+
3539
target.use(function(err, req, res, next) {
3640
res.send(err);
3741
next();

0 commit comments

Comments
 (0)