Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

263
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda