Skip to content

Commit

Permalink
[#526] Add small test check for raised question.
Browse files Browse the repository at this point in the history
  • Loading branch information
nik-blue-lava authored and monkpow committed Sep 11, 2023
1 parent 0122595 commit 9af657e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/proxyReqOptDecorator.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ describe('proxyReqOptDecorator', function () {
app.use(proxy('localhost:12345', {
proxyReqOptDecorator: function (reqOpt, req) {
reqOpt.headers['user-agent'] = 'test user agent';
reqOpt.headers['content-type'] = 'multipart/form-data';
assert(req instanceof http.IncomingMessage);
return reqOpt;
}
Expand All @@ -75,6 +76,7 @@ describe('proxyReqOptDecorator', function () {
.end(function (err, res) {
if (err) { return done(err); }
assert.equal(res.body.headers['user-agent'], 'test user agent');
assert.equal(res.body.headers['content-type'], 'multipart/form-data');
done();
});
});
Expand Down

0 comments on commit 9af657e

Please sign in to comment.