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

CLI Coverage #251

Merged
merged 1 commit into from
Jan 30, 2019
Merged

CLI Coverage #251

merged 1 commit into from
Jan 30, 2019

Conversation

guybedford
Copy link
Contributor

This implements coverage for the CLI by making the integration tests run through the cli driver directly, instead of only using the internal API.

Under this model, we use the API for the unit tests, and the CLI for the integration tests.

In order to get this to work easily with the coverage, I simply modified the CLI file to return an API interface when running in a non-CLI mode. This also required fixing the behaviour of the require.main === module check which should help many other build cases as well :)

Coverage is now around 80%, and we can continue to improve this still quite easily as well.

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@04fbbe7). Click here to learn what that means.
The diff coverage is 51.18%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #251   +/-   ##
=========================================
  Coverage          ?   81.45%           
=========================================
  Files             ?       16           
  Lines             ?      685           
  Branches          ?        0           
=========================================
  Hits              ?      558           
  Misses            ?      127           
  Partials          ?        0
Impacted Files Coverage Δ
src/index.js 69.01% <ø> (ø)
src/loaders/relocate-loader.js 97.14% <100%> (ø)
src/cli.js 59.47% <47.45%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 04fbbe7...e91832b. Read the comment docs.

@rauchg rauchg merged commit 7eb591f into master Jan 30, 2019
@rauchg rauchg deleted the integration-coverage branch January 30, 2019 21:26
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.

3 participants