Sudoku Solver Last 2 Tests Not Passing

I’ve been stuck on this for ages and would like to pass this. All tests pass except for the last two.

Here’s my repo.

Any help would be greatly appreciated!

Did you set the NODE_ENV environment variable to allow for running those two tests?

No. What do they need to be set to?

It should be set to test, just take another look at the instructions on the project page.

1 Like

I have that line un-commented and it is set to test but I still get the last two not passing. I’ll take a closer look in the test files for anything I may have missed.

That won’t do it. It’d need to be set in the file that’s called literally just .env. However in replit that needs to be set in the secrets tab on the left, as they no longer allow creating .env files.

1 Like

So the information goes into the sample.env file? I’ll add what is in that file as that is the only .env I see.

const mySecret = process.env['NODE_ENV']
# Environment Config

# store your secrets and config variables in here
# only invited collaborators will be able to see your .env values

# reference these in your code with process.env.SECRET
# note: .env is a shell file so there can't be spaces around '='

PORT=3000
NODE_ENV=test

The new Repl UI is new to me. Thanks for the help, I appreciate it.

Just setting it in secrets tab should be enough. And also starting server again. This time in the console should be visible output from tests, what also will mean project page should be able to test it properly.

1 Like

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