After upgrading from Angular 13 to 14 I am having issues with my unit tests, using ng-bullet. Only the first test of each test spec is passing with the remaining tests failing. There is a deprecation warning which ng-bullet seems to violate:
"An asynchronous before/it/after function took a done callback but also returned a promise. This is not supported and will stop working in the future. Either remove the done callback (recommended) or change the function to not return a promise."
I assume that this piece of code in the ng-bullet source code is violating the deprecation warning:
if (configureAction) {
beforeAll((done: DoneFn) => (async () => {
configureAction();
await TestBed.compileComponents();
})().then(done).catch(done.fail));
}
While upgrading to Angular 14 I have not changed any versions for Karma or Jasmine so I made the assumption that it should not break. Why does it still break although I have not changed the testing libraries versions? I am using karma 6.4.0, jasmine core 3.8.0 and karma-jasmine 4.0.1.
Is there any workaround?
Thank you.