Metric/Imperial converter: All 16 unit tests are complete and passing

So I have all the requirements covered and I have 16 passing unit tests in the tests file. I have no idea why this requirement keeps failing.
Here’s my code:

Run the tests with the browser console open. You’ll see several

Error: expected 'l' to equal 'L'

and

Error: At least 16 tests passed: expected 13 to be at least 16

which is confirmed on the server console (I counted 13 tests in the source), which is also not running the functional tests (because they don’t exist) and shows

Error: At least 5 tests passed: expected 0 to be at least 5

in the browser console.

So, make sure you have set process.env.NODE_ENV to test, make sure the expected 16 unit tests are in the Unit Tests suite (don’t change the name from the original), make sure the expected 5 tests are in the Functional Tests suite (or whatever it is in the boilerplate), and then fix the l<->L errors.

If you changed the original boilerplate, you may want to compare your test files to the original to ensure all is correct.

I know I haven’t written the functional tests yet. But the problem is I’ve written all 16 unit tests and they all pass when I run them, I’ve tried removing the NODE_ENV condition and adding it. It still doesn’t work. Also when I check the browser console all I get is

Error: expected { status: ‘unavailable’ } to be an array

I’m not sure what that means

There were only 13 in the git repo posted before. I even counted them. I cloned and ran your repo on repl.it and those 13 were passing.

The error looks like you’ve not set process.env.NODE_ENV to test because the code that checks the tests looks for that to be set. In repl.it you have to set it on the sidebar as a secret key (the lock icon). Regardless of environment, it needs to be there for the test tests to run.

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