From ad928fb85d192375a2da3bb56b68d770ebfbd596 Mon Sep 17 00:00:00 2001 From: Jack Franklin Date: Wed, 13 May 2020 10:43:46 +0100 Subject: [PATCH] chore: force Mocha to exit on CI We have some bug where some test runs will pass but then stall as Mocha doesn't exit cleanly. This is proving very hard to track down (I've yet to replicate it or find the test that causes it) and it doesn't happen consistently. The `exit` flag forces Mocha to hard exit. This will help with CI stability. The flag only gets set on CI runs. --- mocha-config/base.js | 1 + 1 file changed, 1 insertion(+) diff --git a/mocha-config/base.js b/mocha-config/base.js index af830b8634e73..6b46c08a712a2 100644 --- a/mocha-config/base.js +++ b/mocha-config/base.js @@ -1,3 +1,4 @@ module.exports = { reporter: 'dot', + exit: !!process.env.CI, };