From ac426232c0f42834bb899db7a49869b70fbf0623 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Tue, 3 Jul 2018 09:34:39 +0700 Subject: [PATCH] Custom error handler so we don't dump the stack trace in the test output --- test/create-test-server.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/create-test-server.js b/test/create-test-server.js index a82ada5..a9fa7a4 100644 --- a/test/create-test-server.js +++ b/test/create-test-server.js @@ -158,6 +158,11 @@ test('opts.bodyParser is passed through to bodyParser', async t => { const bigServer = await createTestServer({ bodyParser: { limit: '200kb' } }); const buf = Buffer.alloc(150 * 1024); + // Custom error handler so we don't dump the stack trace in the test output + smallServer.use((err, req, res, next) => { // eslint-disable-line no-unused-vars + res.status(500).end(); + }); + t.plan(3); smallServer.post('/', (req, res) => {