Quality Assurance and Testing with Chai - Learn How JavaScript Assertions Work

Tell us what’s happening:

A diferença entre isNull e isNotNull no Chai (usado nos testes) é simples:

assert.isNull(value): Verifica se o value é exatamente null. Se for null, o teste passa; caso contrário, falha.

Exemplo: assert.isNull(null) passa; assert.isNull(0) falha.
assert.isNotNull(value): Verifica se o value não é null. Se for qualquer coisa diferente de null (como undefined, números, strings, objetos), o teste passa; se for null, falha.

Exemplo: assert.isNotNull(1) passa; assert.isNotNull(null) falha.

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 Edg/146.0.0.0

Challenge Information:

Quality Assurance and Testing with Chai - Learn How JavaScript Assertions Work

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.