corepack icon indicating copy to clipboard operation
corepack copied to clipboard

Use NOCK_ENV=replay by default

Open geigerzaehler opened this issue 11 months ago • 3 comments

Replaying HTTP requests makes the tests faster and aligns them with CI.

I only realized quite late that the tests get a lot faster so I thought it would be a good idea to make that the default.

geigerzaehler avatar Feb 12 '25 11:02 geigerzaehler

Could I get some feedback on this?

geigerzaehler avatar Apr 04 '25 09:04 geigerzaehler

I'm not sure, it would feel a bit "too magical" for the default behavior to not match reality. Is it so bad to have to set the variable manually / go through the network?

aduh95 avatar Apr 04 '25 11:04 aduh95

I'm not sure, it would feel a bit "too magical" for the default behavior to not match reality.

I don’t see an issue with this. This is test code and people will expect mocks, etc. that don’t match reality. Right now the default behavior does not match what is run on CI, which is worse, I think. I was very confused when my tests where failing on CI but not locally. Using the recording is also faster and more reliable for for local development.

Is it so bad to have to set the variable manually / go through the network? Of course it’s easy to set the environment variable. But this is nowhere documented for new contributors and even I sometimes forget.

geigerzaehler avatar Apr 04 '25 15:04 geigerzaehler