Skip to content

Commit

Permalink
Fix test coverage for resource
Browse files Browse the repository at this point in the history
  • Loading branch information
snuggs committed Dec 10, 2018
1 parent 981baa1 commit fa51f92
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions resource/index.test
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,34 @@ const
test ('Distribute media to CDN')


test ('HEAD Resource response')


test ('OPTIONS Resource response')


test ('Caching HTML, JSON, Javascript, and CSS')


test ('HEAD Resource response', async t => {

const
resource = Resource ``

, server =
(new Server ( [ route (resource) ] ))
.serve ``

, ALLOWED_METHODS = DEFAULT_METHODS


let { status, headers }
= await fetch ( URL + 'index.html', { method: 'HEAD' } )

t.equal ( 200, status )
t.notOk ( headers.get ('allow') )

server.close ``
t.end ()
})

test ('Default Resource allowed methods', async t => {
const
resource = Resource ``
Expand Down

0 comments on commit fa51f92

Please sign in to comment.