Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

591
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda