mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[fix] properly support iojs with test checking for HTTPS
This commit is contained in:
parent
6201ac76f7
commit
c6dfb04a67
@ -1,4 +1,5 @@
|
||||
var httpProxy = require('../lib/http-proxy'),
|
||||
semver = require('semver'),
|
||||
expect = require('expect.js'),
|
||||
http = require('http')
|
||||
https = require('https'),
|
||||
@ -166,7 +167,7 @@ describe('lib/http-proxy.js', function() {
|
||||
|
||||
proxy.on('error', function (err, req, res) {
|
||||
expect(err).to.be.an(Error);
|
||||
if (process.versions.node.indexOf('0.12.') == 0) {
|
||||
if (semver.gt(process.versions.node, '0.12.0')) {
|
||||
expect(err.toString()).to.be('Error: self signed certificate')
|
||||
} else {
|
||||
expect(err.toString()).to.be('Error: DEPTH_ZERO_SELF_SIGNED_CERT')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user