Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What does the stats.other key in the index.json signify ? #390

Open
atharvasune opened this issue Jan 19, 2023 · 3 comments
Open

What does the stats.other key in the index.json signify ? #390

atharvasune opened this issue Jan 19, 2023 · 3 comments

Comments

@atharvasune
Copy link

Hi,
I have a project that uses mochawesome for report generation. We parse the index.json that is generated for some analysis, and I just wanted to understand what does the other key under stats mean ?
I went through mochawesome.js file and found this

obj.stats.other = passes + failures + pending - tests; // Failed hooks
obj.stats.hasOther = obj.stats.other > 0;
obj.stats.skipped = testTotals.skipped;
obj.stats.hasSkipped = obj.stats.skipped > 0;
obj.stats.failures -= obj.stats.other;

So is it safe to assume that other is similar to failures ?

@adamgruber
Copy link
Owner

Hi. As stated in the comment, it refers to any hooks that have failed. For example, if some code inside a before() call throws an error that would be reported in other.

@atharvasune
Copy link
Author

Got it. One more thing I am trying to understand is, could there be a case, where other > 0 but all tests have passed ? @adamgruber , have you observed any such cases ?

@adamgruber
Copy link
Owner

I do not recall having observed such a case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants