diff --git a/package.json b/package.json index eeae83c09..49a7cc38d 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "main": "index.js", "dependencies": { "bl": "~0.9.0", - "caseless": "~0.8.0", + "caseless": "~0.9.0", "forever-agent": "~0.5.0", "form-data": "~0.2.0", "json-stringify-safe": "~5.0.0", diff --git a/tests/browser/test.js b/tests/browser/test.js index 9d504c21a..2ca07b712 100644 --- a/tests/browser/test.js +++ b/tests/browser/test.js @@ -13,7 +13,18 @@ var assert = require('assert') , tape = require('tape') , request = require('../../index') -tape('Request browser test', function(t) { +tape('returns on error', function(t) { + t.plan(1) + request({ + uri: 'https://stupid.nonexistent.path:port123/\\<-great-idea', + withCredentials: false + }, function (error, response) { + t.equal(response.statusCode, 0) + t.end() + }) +}) + +tape('succeeds on valid URLs (with https and CORS)', function(t) { t.plan(1) request({ uri: 'https://localhost:6767',