Skip to content

Commit c6dfb04

Browse files
committed
[fix] properly support iojs with test checking for HTTPS
1 parent 6201ac7 commit c6dfb04

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/lib-https-proxy-test.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
var httpProxy = require('../lib/http-proxy'),
2+
semver = require('semver'),
23
expect = require('expect.js'),
34
http = require('http')
45
https = require('https'),
@@ -166,7 +167,7 @@ describe('lib/http-proxy.js', function() {
166167

167168
proxy.on('error', function (err, req, res) {
168169
expect(err).to.be.an(Error);
169-
if (process.versions.node.indexOf('0.12.') == 0) {
170+
if (semver.gt(process.versions.node, '0.12.0')) {
170171
expect(err.toString()).to.be('Error: self signed certificate')
171172
} else {
172173
expect(err.toString()).to.be('Error: DEPTH_ZERO_SELF_SIGNED_CERT')

0 commit comments

Comments
 (0)