Skip to content

Commit

Permalink
switch to testing status 100, to avoid 100-continue behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
jonchurch committed May 4, 2024
1 parent 86eb68c commit 6bc5136
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/res.status.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@ describe('res', function () {
});

describe('accept valid ranges', function() {
it('should set the response status code to 100', function (done) {
// not testing w/ 100, because that has specific meaning and behavior in Node as Expect: 100-continue
it('should set the response status code to 101', function (done) {
var app = express()

app.use(function (req, res) {
res.status(100).end()
res.status(101).end()
})

request(app)
.get('/')
.expect(100, done)
.expect(101, done)
})

it('should set the response status code to 201', function (done) {
Expand Down

0 comments on commit 6bc5136

Please sign in to comment.