From acc99185e8100b2c4a4553461158c690cc617451 Mon Sep 17 00:00:00 2001 From: Kobi Meirson Date: Fri, 6 Apr 2018 00:12:03 +0300 Subject: [PATCH] Let's get coveralls to show 100% --- test/test_alexa_integration_express.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/test_alexa_integration_express.js b/test/test_alexa_integration_express.js index 92fc62d..6601796 100644 --- a/test/test_alexa_integration_express.js +++ b/test/test_alexa_integration_express.js @@ -87,6 +87,18 @@ describe("Alexa", function() { .get('/testApp') .expect(404); }); + + it("fails with server error on bad request", function() { + testApp.pre = function () { + throw "SOME ERROR"; + }; + return request(testServer) + .post('/testApp') + .send() + .expect(500).then(function (response) { + return expect(response.error.text).to.eq("Server Error"); + }); + }); }); context("#express with debug set to true", function() {