diff --git a/.travis.yml b/.travis.yml index 4aa28c5..f4d6c76 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ node_js: - 6 - 7 - 8 + - 9 script: - npm run lint - npm run test diff --git a/test/test.js b/test/test.js index 4c7bcd9..d2885e5 100644 --- a/test/test.js +++ b/test/test.js @@ -392,10 +392,14 @@ describe('Proxy errors', function() { }); it('Invalid HTTP status code', function(done) { + var errorMessage = 'RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: 0'; + if (parseInt(process.versions.node, 10) < 9) { + errorMessage = 'RangeError: Invalid status code: 0'; + } request(cors_anywhere) .get('/' + bad_status_http_server_url) .expect('Access-Control-Allow-Origin', '*') - .expect(404, 'Not found because of proxy error: RangeError: Invalid status code: 0', done); + .expect(404, 'Not found because of proxy error: ' + errorMessage, done); }); it('Content-Encoding invalid body', function(done) {