We have observed random karma test in our CI pipeline. In each run different test fails and sometimes it passes, when it fails this error is thrown:
Uncaught TypeError: params.map is not a function thrown
Has anybody got affected by something similar?
We have find out that it was caused by other component spec. In this component we are using ActivatedRoute, Router and DialogService (from angularx-bootstrap-modal). It seems that this component couldn't be removed before next test or something like that. Out solution for this error, we are calling
fixture.destroy()
in afterEach
in spec that was causing this failure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With