diff --git a/package.json b/package.json index b11b933..436895f 100644 --- a/package.json +++ b/package.json @@ -13,18 +13,18 @@ "url": "https://github.com/mattdesl" }, "dependencies": { - "buffer-to-arraybuffer": "0.0.2", - "object-assign": "^3.0.0", - "query-string": "^2.4.0", + "buffer-to-arraybuffer": "^0.0.5", + "object-assign": "^4.1.1", + "query-string": "^5.0.1", "simple-get": "^1.4.3", - "timed-out": "^2.0.0", + "timed-out": "^4.0.1", "url-set-query": "^1.0.0", "xhr": "^2.0.4" }, "devDependencies": { "faucet": "0.0.1", "hihat": "^2.4.3", - "standard": "^5.1.1", + "standard": "^10.0.3", "tape": "^4.0.1" }, "scripts": { diff --git a/test/index.js b/test/index.js index be05554..ac726e9 100644 --- a/test/index.js +++ b/test/index.js @@ -57,7 +57,7 @@ test('test timeout', function (t) { request('http://localhost:9021/', { timeout: 1000 }, function (err) { - if (err) t.equal(err.code, 'ETIMEDOUT', 'got error') + if (err) t.equal(err.code, 'ESOCKETTIMEDOUT', 'got error') else t.fail('should have received error') server.close() }) @@ -115,7 +115,7 @@ test('test arraybuffer', function (t) { var server = http.createServer(function (req, res) { res.statusCode = 200 - var contents = new Buffer(array) + var contents = Buffer.from(array) res.setHeader('content-type', 'application/octet-stream') res.setHeader('content-length', contents.length) setCORS(res) diff --git a/test/test-browser.js b/test/test-browser.js index 3b4f1b3..2bf222a 100644 --- a/test/test-browser.js +++ b/test/test-browser.js @@ -1,4 +1,4 @@ -/*globals XMLHttpRequest*/ +/* globals XMLHttpRequest */ var test = require('tape') var request = require('../') @@ -22,7 +22,6 @@ test('should xhr from a JSON file', function (t) { }), true) }) }, 1000) - }) test('should respond with text by default', function (t) {