Skip to content

Commit

Permalink
[fix] properly support iojs with test checking for HTTPS
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrugzz committed Apr 2, 2015
1 parent 6201ac7 commit c6dfb04
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/lib-https-proxy-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var httpProxy = require('../lib/http-proxy'),
semver = require('semver'),
expect = require('expect.js'),
http = require('http')
https = require('https'),
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit c6dfb04

Please sign in to comment.