goldbergyoni/nodejs-testing-best-practices

More isolation scenarios

Closed this issue · 2 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