testjavascript / nodejs-integration-tests-best-practices

✅ Beyond the basics of Node.js testing. Including a super-comprehensive best practices list and an example app (March 2024)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

More isolation scenarios

goldbergyoni opened this issue · comments

We could show even better how to simulate the real-world chaos in a lab by showing the following tests:

// ❌ Anti-Pattern: We didn't test the scenario where the mailer does not reply (timeout)
// ❌ Anti-Pattern: We didn't test the scenario where the mailer reply slowly (delay)
// ❌ Anti-Pattern: We didn't test the scenario of occasional one-time response failure which can be mitigated with a retry

// ❌ Anti-Pattern: We didn't test the scenario where the mailer reply slowly (delay)

Why should we test it?

I guess this was asked before we discussed in via Whatsapp