I have one more student grading spec fails and I can’t figure out what I am supposed to do? Can anyone give me some direction? It appears I passed all of my tests, as well as all of the tests in the student grading spec aside from this one.
@christinichka - in your repli.it files there is a studentgrade.spec.js file (line 17?- I can’t see it very good here) mentioned in your failure message - look there for GRADING TEST that did not pass
Line 17 is the loop for determining how many tests were done. I have all 13 showing in the console as passed so I’m not sure why this spec is failing?
I too was having the same issue. What I did was added a console.log in the grading file to printout the length of the passedExpectations and it showed a list of numbers and found out that each test has to at least be a number greater than 0. As long it shows a number other than 0, it should pass.
I have one test that shows 0 when I do this. How did you fix it to show more than 0?
I was able to get it fixed with the help of another classmate helping me to determine what was wrong! Thanks so much @jowest for the console.log tip! Apparently in my test 12 I was calling multiple things rather than zeroing in on the actual value I needed which is what caused it to be a zero value. It’s all fixed and I got the coveted green check mark.
In my case, the one that showing me a 0 was test #12. Apparently even though it was saying it was passed, it didn’t fully pass the expect function because the response.results.value I was getting was showing undefine even though wanted to equal False. I found that by just printing out the result value. The best I would recommend is make sure the value of what you trying to compare matches with the value that’s to be expected.
funny that mine was the same test case! Mine was set toBeFalse and it worked overall but not specifically for the requirement!
@christinichka was this a change you had to make with your tests then? Or did you have to adjust your code. I currently have my tests set up similar to the studentgrade tests.
@christinichka I got it figured out, thank you!
I had to add a little to my test because I was not being specific enough. Glad you got it figured out!