With JUNIT, you test Java processes. However, the error message comes from Node.js, a separate process. The error message also states that the Node.js process is shutting down. I would recommend using chai, jest, or mocha (i.e., any Node.js test framework). I hope I could help.