Tell us what’s happening:
Describe your issue in detail here.
Hello, I have been working on the sudoku solver project and finally got it where I want it. When I go to submit the project the only 2 failing qualifications are that both my unit and functional tests are not passing but when i run ‘npm run test’ it says they all pass. Upon looking for a solution I found that some people who encountered the same problem were not using assertions. So I went back and verified that I was using assertions so its not that. The only thing I can think of it being is that FCCs tests check that you are using the puzzle strings within puzzle-strings.js.
Side Note: very unlikely but I am using Firefox which most other devs that had the same problem were using. Maybe browser related?
Any help/suggestions would be great as I have no way to tell why my project cant be submitted despite saying its tests pass.
I fixed it.
It was that line of code in ‘fcctesting.js’.
if (process.env.NODE_ENV === 'test') return next();
Found out that the NODE_ENV was undefined. I was on Repl.it and you have to add your environment variables on the sidebar and not in the sample.env file.
Hope this helps anyone in the future save some time.
Maybe FCC should add a note in the project page for any app that requires env variables. That they need to do it in the sidebar of the REPL platform and not use the .env file. For their testing purposes at least.