Question Alvi A in lesson «Testing code with other code», course «Programming fundamentals»

Alvi A

Hello! I can't understand why my solution doesn't work. Can you please explain what does this OUTPUT mean?

make: Entering directory '/usr/src/app'
suppressor pass 'RESULT=pass babel-node test.js'
suppressor fail 'RESULT=fail1 babel-node test.js'
suppressor fail 'RESULT=fail2 babel-node test.js'
suppressor fail 'RESULT=fail3 babel-node test.js'
suppressor fail 'RESULT=fail4 babel-node test.js'
#   
 Expected tests to fail, but they passed. See output above. 
Makefile:2: recipe for target 'test' failed
make: Leaving directory '/usr/src/app'
make: *** [test] Error 1

Run failed! Check and fix errors above!

R. D.

Hey Alvi!

The most important line here is Expected tests to fail, but they passed. Tests expect certain behavior from your code. If your code does what tests expect, then it passes the tests.

In this exercise, you're writing your own tests, and Hexlet's tests evaluate your tests :-) Double layer of tests! Our tests are testing your tests.

When Hexlet is testing your tests, it needs to check that they pass when needed and fail when needed. For example, if your test passes when it needs to fail, then your tests is incorrect.

All this means is that you didn't write 3 correct tests as described, I'm afraid. Make sure you write 3 working assertions.

Alvi A

Hey Rakhim! Oh, I've got it. Thanks for your detailed answer and wonderful course!

Use Hexlet to the fullest extent!

  • Ask questions about the lesson
  • Test your knowledge in quizzes
  • Practice in your browser
  • Track your progress

Sign up or sign in

By sending this form, you agree to our Personal Policy and Service Conditions
Suggested learning programs
profession
Development of front-end components for web applications
10 months
from scratch
Start at any time
profession
Layout with the latest CSS standards
5 months
from scratch
under development
Start at any time
profession
new
Developing web applications with Django
10 months
from scratch
under development
Start at any time