[fix test] Update tests.

This commit is contained in:
indexzero 2019-08-22 01:59:54 -05:00 committed by Charlie Robbins
parent 16d4f8a951
commit dd1d08b631
2 changed files with 3 additions and 3 deletions

View File

@ -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');

View File

@ -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')
}