Intercept and mock outgoing Node.js network TCP connections and HTTP requests for testing. Intercepts and gives you a Net.Socket, Http.IncomingMessage and Http.ServerResponse to test and respond with. Super useful when testing code that hits remote servers.
Good afternoon,
first I found this library incredible, congratulations on the work!
I use lib to intercept various protocols (http, https, mongodb, rabbitmq, redis, etc. ..)
however, when I try to intercept the gRPC calls made by lib Google PubSub it doesn't work like the other protocols, it seems to be looping.
investigating on the internet, i found that this lib uses under the engine called gRPC, and that in turn uses underneath called http2
Our use case is not for the purpose of TDD (unit tests), but I use it as a Firewall allowing or not requests.
Below is an example of my code:
`
var Mitm = require("mitm");
var mitm = Mitm();
mitm.enable();
Good afternoon, first I found this library incredible, congratulations on the work!
I use lib to intercept various protocols (http, https, mongodb, rabbitmq, redis, etc. ..) however, when I try to intercept the gRPC calls made by lib Google PubSub it doesn't work like the other protocols, it seems to be looping.
investigating on the internet, i found that this lib uses under the engine called gRPC, and that in turn uses underneath called http2
Our use case is not for the purpose of TDD (unit tests), but I use it as a Firewall allowing or not requests.
Below is an example of my code:
` var Mitm = require("mitm"); var mitm = Mitm(); mitm.enable();
`
Nodejs : v12.16.1