In our app.js file, we are currently able to execute only 92 out of 200 branches , leaving us below 50% branch coverage . We are unable to execute certain branches because specific if-else conditions depend on a middleware request.
During local testing, we are unable to establish a connection with the middleware endpoint, which causes the request to throw an error. As a result, the middleware function returns false, triggering only the error notification. This prevents the success-related functions, which depend on a true response from the middleware, from executing. Since 5 to 6 functions rely on the middleware request returning true, we are unable to cover those branches and improve our overall code coverage