Skip to content

Commit

Permalink
[#363] Tests for host as ip address. (#371)
Browse files Browse the repository at this point in the history
  • Loading branch information
monkpow committed Sep 19, 2018
1 parent f7c55cf commit 762b16f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/host.js
Expand Up @@ -49,3 +49,22 @@ describe('host can be a dynamic function', function () {
});
});
});

describe('host can be an ip address', function () {
it('with a port', function (done) {
var app = express();
app.use('/proxy/', proxy('127.0.0.1:3020'));

var targetApp = express();
targetApp
.get('/', function (req, res) { res.sendStatus(211); })
.listen(3020);


request(app)
.get('/proxy/')
.expect(211)
.end(done);
});
});

0 comments on commit 762b16f

Please sign in to comment.