DEV Community

Discussion on: Improving Angular tests by enabling Angular testing module teardown

Collapse
 
layzee profile image
Lars Gyrup Brink Nielsen

This update is about two things:

  • Performance issues when using Karma. Impact will vary.
  • Correctness. Destroying modules and services using the any or root provider scopes.

Do you have stateful Angular modules or root/any-provided services? Do they implement OnDestroy? Otherwise, you won't notice anything performance-wise. If you do, you might catch subtle bugs and you might notice performance improvements. Jest is good at parallelizing so much less so than Karma.