From 67977522b0bfcea564a89add1ed0fa749b21216f Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 7 Sep 2015 00:34:24 -0400 Subject: [PATCH] tests: add test for util.inspect in HTML response --- test/test.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/test.js b/test/test.js index dea8d9f..129f464 100644 --- a/test/test.js +++ b/test/test.js @@ -129,6 +129,17 @@ describe('errorHandler()', function () { .expect(/
  •    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(/Error<\/title>/) + .expect(/<h2><em>500<\/em> Error<\/h2>/) + .expect(/<li>{ foo: 'bar', fizz: 'buzz' }<\/li>/) + .expect(500, done) + }) }) describe('when "Accept: application/json"', function () {