From 1b650bb84a07a163006e16130268ef63d8fa30cd Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Fri, 17 Dec 2021 00:35:58 -0500 Subject: [PATCH] build: superagent@3.8.3 --- .github/workflows/ci.yml | 4 ++-- package.json | 2 +- test/test.js | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dec23a0..8c3e914 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,11 +23,11 @@ jobs: include: - name: Node.js 0.10 node-version: "0.10" - npm-i: mocha@3.5.3 nyc@10.3.2 + npm-i: mocha@3.5.3 nyc@10.3.2 superagent@2.3.0 - name: Node.js 0.12 node-version: "0.12" - npm-i: mocha@3.5.3 nyc@10.3.2 + npm-i: mocha@3.5.3 nyc@10.3.2 superagent@2.3.0 - name: Node.js 4.x node-version: "4.9" diff --git a/package.json b/package.json index 49c371d..66a636f 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "pend": "1.2.0", "require-all": "3.0.0", "rimraf": "2.6.3", - "superagent": "2.3.0" + "superagent": "3.8.3" }, "files": [ "HISTORY.md", diff --git a/test/test.js b/test/test.js index 594550e..ff76e7d 100644 --- a/test/test.js +++ b/test/test.js @@ -840,7 +840,7 @@ var standaloneTests = [ req.field('b', val); req.field('c', val); req.on('error', function(err) { - assert.ifError(err); + assert.strictEqual(err.message, 'Payload Too Large') }); req.end(); req.on('response', function(res) { @@ -925,7 +925,7 @@ var standaloneTests = [ req.attach('file0', fixture('pf1y5.png'), 'SOG1.JPG'); req.attach('file1', fixture('pf1y5.png'), 'SOG2.JPG'); req.on('error', function(err) { - assert.ifError(err); + assert.strictEqual(err.message, 'Payload Too Large') }); req.end(); req.on('response', function(res) { @@ -977,7 +977,7 @@ var standaloneTests = [ req.attach('file0', fixture('pf1y5.png'), 'SOG1.JPG'); req.attach('file1', fixture('pf1y5.png'), 'SOG1.JPG'); req.on('error', function(err) { - assert.ifError(err); + assert.strictEqual(err.message, 'Payload Too Large') }); req.end(); req.on('response', function(res) { @@ -1059,7 +1059,7 @@ var standaloneTests = [ var url = 'http://localhost:' + server.address().port + '/upload'; var req = superagent.post(url); req.on('error', function(err) { - assert.ifError(err); + assert.strictEqual(err.message, 'Unsupported Media Type') }); req.end(); req.on('response', function(res) { @@ -1092,7 +1092,7 @@ var standaloneTests = [ req.set('Content-Type', 'application/json'); req.write('{}'); req.on('error', function(err) { - assert.ifError(err); + assert.strictEqual(err.message, 'Unsupported Media Type') }); req.end(); req.on('response', function(res) { @@ -1124,7 +1124,7 @@ var standaloneTests = [ var req = superagent.post(url); req.attach('file0', fixture('pf1y5.png'), 'SOG1.JPG'); req.on('error', function(err) { - assert.ifError(err); + assert.strictEqual(err.message, 'Bad Request') }); req.end(); req.req.setHeader('Content-Type', 'multipart/form-data') @@ -1210,7 +1210,7 @@ var standaloneTests = [ var req = superagent.post(url); req.attach('file0', fixture('pf1y5.png'), 'SOG1.JPG'); req.on('error', function(err) { - assert.ifError(err); + assert.strictEqual(err.message, 'Internal Server Error') }); req.end(); req.on('response', function(res) {