Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

589
Views
ConfigureTestSuite - Deprecation error: asynchronous before/it/after function

Our unit tests are showing deprecation errors.

As far as I investigated it is related to using the "configureTestSuite" method from 'ng-bullet'. Setting up my test suite as shown below throws the following error:

DEPRECATION: 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. (in suite: ToastComponent)

import { TestBed } from '@angular/core/testing';
import { configureTestSuite } from 'ng-bullet';

import { ToastComponent } from './toast.component';

describe('ToastComponent', () => {
  configureTestSuite(() =>
    TestBed.configureTestingModule({
      declarations: [ToastComponent],
    }).compileComponents()
  );

 it('should create', () => {
    console.log('do nothing');
  });
});

It would be awesome if somebody could help me out how to get rid of those errors. The tests still pass currently, but still the deprecation is shown as an error. If I remove the configureTestSuite and use the standard beforeEach to set up my TestBed it doesn't throw the error. Not an option, since ng-bullet is speeding up our tests a lot.

I'm using Angular 11 / Karma 6, Jasmine-Core 3.6. Happy to give more input if needed.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

As said in the link :

this fix need to be released with new version of zone.js, so please wait for the new release of the zone.js

https://github.com/angular/angular/pull/45025

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!