mirror of
https://github.com/d0zingcat/cors-anywhere.git
synced 2026-05-13 23:16:51 +00:00
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:
@@ -5,6 +5,7 @@ node_js:
|
||||
- 6
|
||||
- 7
|
||||
- 8
|
||||
- 9
|
||||
script:
|
||||
- npm run lint
|
||||
- npm run test
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user