"Test runner failed"

I’m trying to run the Relational database course locally on my windows 11 machine and not able to even get started.
I’ve followed all the instructions provided in this article Relational Database Course – How to Learn SQL in VSCode Using Docker and freeCodeCamp

I’ve chosen the “Learn bash by building a boilerplate” course first

When I try to click on “Run” it gives ‘Test runner failed’

I’ve tried rebuilding the container, restarting vscode but nothing is working for me.
Please help / guide me on how to solve this issue.

Welcome there,

It does not look like you followed the lesson instructions to pass the test?

1 Like

Hi, I did follow the lesson instructions & then tried to click on run. Apologies for the wrong screenshot in the post.

Also another question, is it possible to run this course by manually setting up the course repo & code-road extension?

1 Like

No worries. I just wanted to make sure.

I am not sure what you mean. You are running the course manually (locally). If you mean outwith the container, then yes, but it will require you to install all the tooling mentioned in the Dockerfile.

@moT01 Do you have any ideas why this is failing? Is the 177 Git changes normal?

1 Like

Hi @Sky020 after some hours of digging I was able to figure out what the exact issue is & narrowed it down to 2 places.

I also took a look at this thread Test Runner Failed - Learn Bash Scripting by Building Five Programs - Backend Development - The freeCodeCamp Forum

I was able to run this project both with & without docker, same issue in both places.

npm install not running

The code road extension is failing to properly setup the project, it changes the directory to /freeCodeCamp but fails to run npm install, which causes .mocharc.json & node_modules/ directory to not be there, essentially failing the tests.

To fix this I had to follow the above thread & @hbar1st 's instructions to manually add the .mocharc.json & install all the npm packages.

Code Road fails to update current level

After this step I’m able to run & progress levels in the course but I noticed that even if I don’t follow the level’s instructions It would still pass the test?

I take a look and found that .mocharc.json has a "spec" property which should be updated with every level you pass. This wasn’t updating
I tried somethings to make it update but it was still not auto-updating.

Only solution is to manually update the "spec" property of .mocharc.json file. (Which is tedious imo)
I do not know if this issue is with Code runner, FCC’s course or the docker container.

My machine specs: Windows 11 - Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz 2.10 GHz | 64-bit operating system, x64-based processor

Any idea what could be causing this? How can we make the code road update the tests automatically?

1 Like

Okay I’m trying to run the Celestial Bodies Database | freeCodeCamp.org test & same issues all over again. Though I have not finished the assignment within it. The mocharc.json & test file (which specifies tests) is missing in the .freecodecamp directory.

Can anybody please share the mocharc.json & the test file so I can make this work?

1 Like

Have you tried the reset button @samirmishra27? It reruns some setup scripts. You probably tried that, but definitely give it a try if you haven’t.

Already tried it & it creates a mess in the project directory, it will create some unknown hundreds of files & delete actual files like mocharc.
The reset script is also broken at least for me.

I can show what it does if you want me to?

What are some of the files that get created?

Have you tried the web version at all?

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