fix expected error message when node 0.12.x

This commit is contained in:
Jeremy Judeaux 2015-04-02 14:22:26 +02:00
parent c33d1616cd
commit 0ee314c436

View File

@ -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();
})