mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[fix test] Update tests.
This commit is contained in:
parent
16d4f8a951
commit
dd1d08b631
@ -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');
|
||||
|
||||
@ -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')
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user