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

379
Vistas
NG0303: Can't bind to 'ngbTooltip' since it isn't a known property of 'button'

ERROR: 'NG0303: Can't bind to 'ngbTooltip' since it isn't a known property of 'button'.'

When I run tests locally for my Angular 12 project, I get this error, in all .spec files where ngbTooltip is used I use CUSTOM_ELEMENT_SCHEMA, it is impossible to track the line on which the error occurs. It is noteworthy that the error is absent with ng serve, but appears with ng test. Tell me how to solve this problem, I tried using CUSTOM_ELEMENT_SCHEMA in the application module, it did not help.

Console output Console output 2

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Try adding NgbModule to imports array in TestBed.configureTestingModule({.

TestBed.configureTestingModule({
  imports: [NgbModule],
...

If you don't want to import NgbModule or it causes issues in your unit tests, you can mock the directive and provide the mock.

@Directive({
  selector: '[ngbTooltip]'
})
class MockNgbTooltip {}
...
TestBed.configureTestingModule({
  // add the mock to the declarations array
  declarations: [MockNgbTooltip],
about 4 years ago · Juan Pablo Isaza 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