freeCodeCamp: [learn] tests should fail when code has error

I entered a valid solution and passed all the tests in the picture below. Then I added the a on the second line: var collection = { a - to make the build fail, but all the test results still have the green check mark like they passed. I think they should go back to failed if there’s an error.

Screen Shot 2019-05-08 at 8 54 04 AM

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (18 by maintainers)

Most upvoted comments

@Stevo99 As Mrugesh said on Gitter, the codebase is a bit complex. The bit responsible for updating the test results is https://github.com/freeCodeCamp/freeCodeCamp/blob/1c669fd56838b68710062bc09f6e4af34e7cf709/client/src/templates/Challenges/redux/execute-challenge-saga.js#L56-L61 and you can see that if there’s an error (which is the case we’re looking at) only the console gets updated, not the tests.

One approach would be to look at the code in https://github.com/freeCodeCamp/freeCodeCamp/blob/1c669fd56838b68710062bc09f6e4af34e7cf709/client/src/templates/Challenges/redux/execute-challenge-saga.js#L82 for inspiration and try to figure out a way to update the tests so they all show as failing.