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

336
Vistas
Prueba unitaria de Angualr: aparece un error como `Navegación activada fuera de la zona Angular, ¿olvidó llamar a 'ngZone.run ()'?`

Aquí está mi configuración básica de la prueba unitaria:

 describe('ShellViewComponentAttributesComponent', () => { let fixture: ComponentFixture<ShellSelectLanguageForEEComponent>; let component: ShellSelectLanguageForEEComponent; let store: MockStore<any>; let location: Location; let router: Router; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ShellSelectLanguageForEEComponent], imports: [ [ RouterTestingModule.withRoutes([ { path: 'SC/subject-curriculum', component: ShellSelectLanguageForEEComponent } ]) ] ], providers: [ provideMockStore({}) ], schemas: [CUSTOM_ELEMENTS_SCHEMA] }).compileComponents(); router = TestBed.get(Router); location = TestBed.get(Location); fixture = TestBed.createComponent(ShellSelectLanguageForEEComponent); router.initialNavigation(); component = fixture.componentInstance; store = TestBed.get(Store); spyOn(store, 'dispatch'); }));

cuando ejecuto el código, recibo varios errores como:

 console.warn node_modules/@angular/core/bundles/core.umd.js:25782 Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?

No estoy activando ninguna navegación. es requerido? porque ya agregué en el módulo. cómo manejar este problema. Encontré la búsqueda pero ninguna solución funciona para mí.

over 4 years ago · Santiago Trujillo
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