mirror of
https://github.com/nestjs/nest.git
synced 2026-10-28 17:56:01 +08:00
Given a server that is not listening, supertest listens on port 0 of every interface and sends its requests to 127.0.0.1, where another process can hold the same port; tests then failed now and then with "socket hang up" or an unexpected response. Add a shared listenOnLoopback() helper and use it in place of app.init() in the specs that test through supertest.