Skip to content
Prev Previous commit
Next Next commit
[fix test] Update tests.
  • Loading branch information
indexzero committed Aug 22, 2019
commit a9eaf25754ecaaeaefd8a98b1ce12dd414b2566f
4 changes: 2 additions & 2 deletions test/lib-http-proxy-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,8 @@ describe('lib/http-proxy.js', function() {
});
});

destiny.on('connection', function (socket) {
expect(socket.upgradeReq.headers['x-special-proxy-header']).to.eql('foobar');
destiny.on('connection', function (socket, upgradeReq) {
expect(upgradeReq.headers['x-special-proxy-header']).to.eql('foobar');

socket.on('message', function (msg) {
expect(msg).to.be('hello there');
Expand Down
2 changes: 1 addition & 1 deletion test/lib-https-proxy-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ describe('lib/http-proxy.js', function() {
proxy.on('error', function (err, req, res) {
expect(err).to.be.an(Error);
if (semver.gt(process.versions.node, '0.12.0')) {
expect(err.toString()).to.be('Error: self signed certificate')
expect(err.toString()).to.be('Error: unable to verify the first certificate')
} else {
expect(err.toString()).to.be('Error: DEPTH_ZERO_SELF_SIGNED_CERT')
}
Expand Down