Add Node 9.x to Travis

Locally tested that the tests pass with Node 9.0.0 and 9.1.0
Also modified a test expectation for Node 9.0.0+
This commit is contained in:
Rob Wu
2017-11-11 01:28:29 +01:00
parent 6741f810f9
commit d2b5dd38bb
2 changed files with 6 additions and 1 deletions

View File

@@ -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) {