Skip to content

Commit

Permalink
Update test expectation for Node 12.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob--W committed May 2, 2020
1 parent a214003 commit 001fbef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,10 @@ describe('Proxy errors', function() {
it('Content-Length mismatch', function(done) {
var errorMessage = 'Error: Parse Error: Invalid character in Content-Length';
// <13.0.0: https://github.com/nodejs/node/commit/ba565a37349e81c9d2402b0c8ef05ab39dca8968
if (parseInt(process.versions.node, 10) < 13) {
// <12.7.0: https://github.com/nodejs/node/pull/28817
var nodev = process.versions.node.split('.').map(function(v) { return parseInt(v); });
if (nodev[0] < 12 ||
nodev[0] === 12 && nodev[1] < 7) {
errorMessage = 'Error: Parse Error';
}
request(cors_anywhere)
Expand Down

0 comments on commit 001fbef

Please sign in to comment.