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

Let istanbul generate combined coverage report #75

Merged
merged 4 commits into from
Dec 19, 2018
Merged

Conversation

jasonkarns
Copy link
Member

istanbul-combine is no longer necessary, since istanbul report does the
same thing: jamestalmage/istanbul-combine#2

This change replaces the istanbul-combine command with istanbul report.
By default, it uses **/coverage.json as the input (which automatically
matches coverage/{unit,safe}/coverage.json).

The default output is coverage/, which is now left as default for
simplicity. Thus the upload script is changed to upload from
coverage/lcov.info instead of coverage/combine/lcov.info.

Lastly, the test:cover script is split so that its role is strictly to
generate the coverage data.

The "post"-test:cover script is responsible for generating the report.
(post script used directly, rather than adding indirection for a
test:cover:report script, since it would rarely be run directly.)

Recursive globs (`**`) can't be relied upon, since the `globstar` option
isn't universally enabled (or even available).

Thus, the glob expression must be expanded by the tool itself.
Wrapping in single quotes clearly indicates the shell isn't doing the
expansion of the globs.
istanbul-combine is no longer necessary, since `istanbul report` does
the same thing: jamestalmage/istanbul-combine#2

This change replaces the `istanbul-combine` command with `istanbul
report`. By default, it uses `**/coverage.json` as the input (which
automatically matches coverage/{unit,safe}/coverage.json).

The default output is `coverage/`, which is now left as default for
simplicity. Thus the upload script is changed to upload from
`coverage/lcov.info` instead of `coverage/combine/lcov.info`.

Lastly, the `test:cover` script is split so that its role is strictly to
generate the coverage data.

The "post"-test:cover script is responsible for generating the report.
(post script used directly, rather than adding indirection for a
test:cover:report script, since it would rarely be run directly.)
@searls
Copy link
Member

searls commented Dec 18, 2018

LGTM

@jasonkarns jasonkarns changed the title Let istanbul generate combined coverage report WIP: Let istanbul generate combined coverage report Dec 18, 2018
@jasonkarns jasonkarns self-assigned this Dec 18, 2018
@jasonkarns jasonkarns changed the title WIP: Let istanbul generate combined coverage report Let istanbul generate combined coverage report Dec 19, 2018
@jasonkarns jasonkarns merged commit 5d9f4c5 into master Dec 19, 2018
@jasonkarns jasonkarns deleted the coverage-scripts branch December 19, 2018 14:20
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

Successfully merging this pull request may close these issues.

2 participants