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

358
Vistas
Matcher error: received value must not be null nor undefined

I am using expect in typescript to write an assertion while writing a Then step definition using typescript in in playwright I have assigned an the class on this url https://www.gov.uk/help/accessibility-statement to confirm I can see accessibility statement when I land on the page.

I then get an undefined error when I run my tests.

Code written:-

import expect from "expect";

Then("I expect to be on the accessibility page", async function(
    
this: OurWorld
) 

{   

    const {page} = this;
    // eslint-disable-next-line no-debugger
    const headMessage =await page?.$(".gem-c-title__text.govuk-heading-xl")
    console.log(headMessage)
    expect (headMessage).toContainEqual(("Accessibility statement")
        
    );
});

I would like to check that the accessibility icon on the accessibility page contains the text accessibility.

The error I am getting back is this:-

× Then I expect to be on the accessibility page # step-definitions\feature.step-definitions.ts:28
       Error: expect(received).toContainEqual(expected) // deep equality

       Matcher error: received value must not be null nor undefined

Thank you for your help

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