From 546ded3bdd88dc60f134886821cf342f5fbb7ede Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Thu, 23 Apr 2020 12:48:02 -0400 Subject: [PATCH] Fixed mocks not responding properly --- test.js | 2 +- test/mocks.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test.js b/test.js index a5f09b0..45ace90 100644 --- a/test.js +++ b/test.js @@ -34,7 +34,7 @@ var mockServer = createMockServer(() => { mocha.run(function(failures) { mockServer.close(); server.close(); - process.exit(failures ? 1 : 0); // exit with non-zero status if there were failures + process.exitCode = failures ? 1 : 0; // exit with non-zero status if there were failures }); }); }); diff --git a/test/mocks.js b/test/mocks.js index a124646..49060af 100644 --- a/test/mocks.js +++ b/test/mocks.js @@ -4,11 +4,11 @@ var app = express(); var config = require('../src/config.js'); app.post('/ReportChannelWebhook', (req, res) => { - res.status(200); + res.sendStatus(200); }); app.post('/FirstTimeSubmissionsWebhook', (req, res) => { - res.status(200); + res.sendStatus(200); }); module.exports = function createMockServer(callback) {