Staging - GradedJestRisk/test-training GitHub Wiki

Questions:

  • should we/when assert component has been called with proper arguments ? unit ? component ?
  • component test between non in/out component ?
  • downside of unit tests ?

Unit test

Make it work

  • use response (or it will fail): use stub
  • does not use response: use fake (cause no error)
Code nature
  • Side-effect free (pure) => test state (return values) => no need for mocks
  • Side -effect (impure) => test side-effect (outside calls) => need spies
Integration test: Side effect ?
⚠️ **GitHub.com Fallback** ⚠️