Skip to content

Commit

Permalink
tests: add test for util.inspect in HTML response
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Sep 7, 2015
1 parent b6e53d7 commit 6797752
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,17 @@ describe('errorHandler()', function () {
.expect(/<li> &nbsp; &nbsp;at/)
.expect(500, done)
})

it('should contain inspected object', function (done) {
request(createServer({ foo: 'bar', fizz: 'buzz' }))
.get('/')
.set('Accept', 'text/html')
.expect('Content-Type', /text\/html/)
.expect(/<title>Error<\/title>/)
.expect(/<h2><em>500<\/em> Error<\/h2>/)
.expect(/<li>{ foo: &#39;bar&#39;, fizz: &#39;buzz&#39; }<\/li>/)
.expect(500, done)
})
})

describe('when "Accept: application/json"', function () {
Expand Down

0 comments on commit 6797752

Please sign in to comment.