Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

597
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda