Two files using supertest with mocha causing EADDRINUSE
问题 I'm using supertest to unit test my server configurations and route handlers. The server configurations tests are in test.server.js and the route handling tests are in test.routes.handlers.js . When I run all the test files using mocha . , I get EADDRINUSE . When I run each file individually, everything works as expected. Both files define and require supertest, request = require('supertest') , and the express server file, app = require('../server.js') . In server.js , the server is started