From 0ee314c436226391318b9a1b623cb3f7e8bf4df7 Mon Sep 17 00:00:00 2001 From: Jeremy Judeaux Date: Thu, 2 Apr 2015 14:22:26 +0200 Subject: [PATCH] fix expected error message when node 0.12.x --- test/lib-https-proxy-test.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/lib-https-proxy-test.js b/test/lib-https-proxy-test.js index fbfabc9..643c726 100644 --- a/test/lib-https-proxy-test.js +++ b/test/lib-https-proxy-test.js @@ -166,7 +166,11 @@ describe('lib/http-proxy.js', function() { proxy.on('error', function (err, req, res) { expect(err).to.be.an(Error); - expect(err.toString()).to.be('Error: DEPTH_ZERO_SELF_SIGNED_CERT') + if (process.versions.node.indexOf('0.12.') == 0) { + expect(err.toString()).to.be('Error: self signed certificate') + } else { + expect(err.toString()).to.be('Error: DEPTH_ZERO_SELF_SIGNED_CERT') + } done(); })