Skip to content

Commit

Permalink
Add test for undefined Response status
Browse files Browse the repository at this point in the history
  • Loading branch information
remcohaszing committed Jun 19, 2017
1 parent c3e1019 commit 0ecdd40
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/test.js
Expand Up @@ -521,6 +521,13 @@ suite('Response', function() {
assert.isTrue(res.ok)
})

test('default status is 200 OK when an explicit undefined status code is passed', function() {
var res = new Response('', {status: undefined})
assert.equal(res.status, 200)
assert.equal(res.statusText, 'OK')
assert.isTrue(res.ok)
})

testBodyExtract(function(body) {
return new Response(body)
})
Expand Down

0 comments on commit 0ecdd40

Please sign in to comment.