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

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

@gurumvg

Description

@gurumvg

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions