Quality Assurance and Testing with Chai - Test if a Variable or Function is Defined

Tell us what’s happening:
Describe your issue in detail here.

Your project link(s)

solution: boilerplate-mochachai - Replit

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36

Challenge: Quality Assurance and Testing with Chai - Test if a Variable or Function is Defined

Link to the challenge:

Please Tell us what’s happening in your own words.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more you say, the more we can help!

As you can see in the attached screenshot, somehow first test case(All tests should pass ) is not being triggered after passing the below tests.

The test suite you wrote for this project should pass

Somehow, It’s not passing.

I’m talking about the tests you wrote - some of them are not passing

From where can I get the verbose error code for test cases that have not passed?
As the screenshots, 3 of those test cases are passed which should trigger that first test case of ( All Passed)

P.S. Please do take a look at Screenshot

No, the screenshot is not saying that every single test in the test suite is passing.

PS I am looking at the screenshot. I’m telling you that the screenshot is not telling you about every single test that is part of this project. You aren’t understanding what I’m saying and I’m trying to explain it differently.


There are 15 different tests in the 1_unit-tests file - every single one of the must be passing.

Sorry for the miscommunication. I get what you’re trying to say.
But I have already fulfilled things mentioned for the exercise
Solution:


I don’t understand why the test case is still falling, There isn’t anything else to do for the given exercise. I’m assuming it’s some technical error with the test case.

Thank you for patience

I don’t think so. I recall these lessons being difficult to get the hang of

  suite('Basic Assertions', function() {
    // #1
    test('#isNull, #isNotNull', function() {
      assert.isNull()(null, 'This is an optional error description - e.g. null is null');
      assert.isNotNull()(1, '1 is not null');
    });
    // #2
    test('#isDefined, #isUndefined', function() {
      assert.isDefined()(null, 'null is not undefined');
      assert.isUndefined()(undefined, 'undefined IS undefined');
      assert.isDefined()('hello', 'A string is not undefined');
    });

These aren’t valid ways to call these assertions - you added an extra set of () that don’t belong