Skip to content

Commit

Permalink
build: support Node.js 13.x
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Sep 21, 2021
1 parent ab1d793 commit 8d58425
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- Node.js 10.x
- Node.js 11.x
- Node.js 12.x
- Node.js 13.x

include:
- name: Node.js 0.8
Expand Down Expand Up @@ -83,6 +84,9 @@ jobs:
- name: Node.js 12.x
node-version: "12.22"

- name: Node.js 13.x
node-version: "13.14"

steps:
- uses: actions/checkout@v2

Expand Down
15 changes: 14 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,20 @@ describe('finalhandler(req, res)', function () {

request(server)
.get('/foo')
.expect(301, '0', done)
.on('request', function onrequest (test) {
test.req.on('response', function onresponse (res) {
// forward aborts as errors for supertest
res.on('aborted', function onabort () {
res.emit('error', new Error('aborted'))
})
})
})
.end(function (err) {
if (err && err.message !== 'aborted') return done(err)
assert.strictEqual(this.res.statusCode, 301)
assert.strictEqual(this.res.text, '0')
done()
})
})
})

Expand Down

0 comments on commit 8d58425

Please sign in to comment.