NestJS - Testing a TCP microservice

Viewed 775

Are there any examples of testing NestJS TCP services? I have got my REST API testing using supertest, something similar for TCP sockets?

1 Answers

supertest is using server.listen(0) method underhood. It binds server to free random port, and using it in request address for superagent.

So you can create your own library with the same principe, or simply look at test-tcp

Related