Reputation: 485
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?
Upvotes: 9
Views: 4246
Reputation: 485
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.
Upvotes: 17