zapier-platform
zapier-platform copied to clipboard
Performance issues with nock + z.request
I'm trying to get our CI pipeline duration down to seconds. At the moment running all unit-tests with mocked requests is still a couple of minutes, which isn't very good.
I'm using nock
in unit tests to mock my http requests. I noticed that there is a huge performance difference between z.request
and vanilla request
module.
Having the request mocked with nock
(i.e. not making an actual http request) it took
- with
z.request
224ms - with
request
2ms
That is a huge difference...
Is it somehow possible to configure the z.request
that for example in unit tests or CI context it would not use all the middleware/logging??