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

254
Vistas
What is assertion methods?

I'm learning AVAJS recently. One thing that sounds kind of abstract to me is 'assertion methods', or simply assertion. For example:

enter image description here

What is it, or what it actually does in programming. I'm looking for some easy-understanding docs to read up. Any recommendations?

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

0

In most javascript test frameworks (including ava) assertion methods are simply functions that throws an error if the asserted condition is not met.

For example the method:

t.true(x, "x must be true");

will simply throw an error if the value of x is 1 or "hello" or false etc. As long as the value of x is not true t.true() will throw an error.

The way most js test frameworks work is to catch all thrown errors and output a nice report.

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