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

311
Vistas
TypeError: Cannot read properties of undefined (reading 'pop') JS Testing Error

Hello I am trying to test my JavaScript Project and am trying to test to make sure this one button works in the code and I am getting this error that I cannot find any answers on. I cannot figure out why reading pop is undefined

Error Message

 TypeError: Cannot read properties of undefined (reading 'pop')

      30 |       </TopContainer>
      31 |       <NavContainer >
    > 32 |       <BackLogoButton id="backButton" onPress={() => navigation.pop(1)}>
         |                                                                 ^
      33 |           <BackLogo source={require('./../assets/back-logo.png')}/>
      34 |         </BackLogoButton>
      35 |       </NavContainer>

Test Code

describe('Tests the BackLogoButton in Tutorial pages', () => {
  it('BackLogoButton is pressable', () => {
    const onPressEvent = jest.fn();
    const wrapper = shallow(<BackLogoButton onPress={onPressEvent}/>);
    onPressEvent.mockReturnValue('');
    wrapper.find('#backButton').first().props().onPress();
    expect(onPressEvent.mock.calls.length).toBe(0);
  });
});
about 4 years ago · Juan Pablo Isaza
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