Have been working on this section of the Curriculum all night with the kind assistance of the Discord, it comes down to syntax issues I think? I have run the code through VsCode as the Repl does not have a linting function in-built, but I can’t seem to isolate when it is passing and when it is not.
I probably have the });'s at different spots than where they should be? I can pass some of the tests in an instant and some take hours.
I believe I understand the concepts being explained here.
Are you creating a new fork of the boilerplate for every challenge? If so, the test fails because you haven’t completed it.
assert.fail does, in fact, make the test not pass (or fail), hence you should be replacing all those assert.fail with the corresponding test.
For instance, to check if a variable is not null, you would write:
let theVariable = null;
assert.isNull(theVariable);
theVariable = "This is not null";
assert.isNotNull(theVariable);
// If you uncomment the following (inside a test, of course)
// the tests would not pass because you would be expecting
// theVariable to be not null and you're explicitly setting it
// to null:
// theVariable = null;
// assert.isNotNull(theVariable)
When you run the tests, on the console is displayed something like N of M tests passed, where N is the number of tests that passed and M the total of tests run. If there are 18 tests in the 1_unit-tests.js file, then the message would be something like 0 of 18 tests passed if none passed.