All tests are passing on Stock Price Checker - but it doesn't allow moving forward

On this project:

All of the tests are passing as seen in picture. But the last test, confirming that the 5 previous tests are passing, is somehow failing.

I saw another post a while back on this same issue but it had no solution.

This seems like a bug?


Please provide a link to your actual code. Screenshots are near impossible to debug.

If I recall correctly, that test is checking that the tests you wrote all pass.

1 Like

For that test, freeCodeCamp queries a hidden endpoint, /_api/get-tests, and check the output of your functional tests. You can see an example here:

But when I hit that endpoint for your project, I get an error:

Looking at this fork of your project, it seems like you’ve done a great job writing the tests. But looking at the code for freeCodeCamp hidden endpoint, there may be an error or an expected environment variable might be commented out, or unavailable: boilerplate-project-stockchecker/fcctesting.js at ba6ea1f3df0be505bcd806bc73e2fd64265696d7 · freeCodeCamp/boilerplate-project-stockchecker · GitHub

Could you make sure that the NODE_ENV=test environment variable is uncommented and available in Replit’s Secrets UI?

That may allow freeCodeCamp tests on Learn to access that hidden endpoint for your project.

1 Like

I hope you will be able to fix it :slight_smile:

1 Like

Ah, this must be @freecodecamper56’s project, not @robertgrigoryan’s like I thought.

I sent all that about the /_api/get-tests endpoint from our support inbox.

Please try what @robertgrigoryan posted above and let us know if it works for you.

The NODE_ENV environment variable is used to run the test suite automatically. It’s probably not necessary to test for that from the fcctesting.js file like we do now. It should be enough to check for errors there.

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