The specification is a test in Jasmine. Inside it, you can expect expectations similar to statements in other testing structures. So the number of specs displayed is the total number of calls to it :
it('passes some expectations', function () { ... });
Typically, you combine several tests, like a module, into it , which should help you combine the functionality together and provide a more consistent view of how your application is developed.
Now, if you insist on wanting to know about the expectations that failed / succeeded in your specification, you can always get this information from your reporter. For example, if you configured an instance of htmlReporter , you can do:
htmlReporter.reportRunnerResults = function (runner) { ... };
Inside your function you can check all kinds of things, here are some tips:
runner.specs() gives you all the specifications- for each of those who say
spec , results = spec.results() will provide you with information about your expectations. results.totalCount , results.failedCount , results.passedCount is what you are looking for;)
source share