Skip to content
This repository has been archived by the owner on Jan 10, 2020. It is now read-only.

'output' option generates incorrect / duplicate count. #25

Open
gurumvg opened this issue Apr 16, 2015 · 0 comments
Open

'output' option generates incorrect / duplicate count. #25

gurumvg opened this issue Apr 16, 2015 · 0 comments

Comments

@gurumvg
Copy link

gurumvg commented Apr 16, 2015

The -o option generates incorrect / duplicate 'passed' count in the generated output file.

For example, running grover on the yui3 'cache' module as below will show the 'passed' count as 58 instead of the actual count which is 29.

grover tests/unit/cache.html -o ./cachle-results.json --json

The issue seems to be in the results normalizing code here. swapping the logic as below seem to resolve the issue.

if (data[key] && (typeof data[key] === 'number')) {
  data[key] += r[key];
}

if (!data[key]) {
  data[key] = r[key];
}

cc: @caridy , @davglass

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

No branches or pull requests

1 participant