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

add code coverage #25760

Merged
merged 1 commit into from
Mar 5, 2018
Merged

add code coverage #25760

merged 1 commit into from
Mar 5, 2018

Conversation

Johann-S
Copy link
Member

@Johann-S Johann-S commented Mar 2, 2018

We this PR we will be sure our JS is covered at 80% but we are free to grow this percentage 😉

BTW it should throw an error if we move under 80% of covered code

Fixes : #25748

/CC @XhmikosR, @bardiharborow

@Johann-S Johann-S changed the title add code corage add code coverage Mar 2, 2018
package.json Outdated
@@ -39,6 +39,7 @@
"js-compile-standalone": "rollup --environment BUNDLE:false --config build/rollup.config.js --sourcemap",
"js-compile-bundle": "rollup --environment BUNDLE:true --config build/rollup.config.js --sourcemap",
"js-compile-plugins": "cross-env PLUGINS=true babel js/src/ --out-dir js/dist/ --source-maps",
"js-compile-plugins-coverage": "cross-env PLUGINS=true NODE_ENV=test babel js/src/ --out-dir js/dist/coverage/ --source-maps",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe I should change the output dir to : js/coverage/dist which is not distributed through npm 🤔

@Johann-S Johann-S force-pushed the v4-dev-johann-coverage branch from efd4c23 to b5f5719 Compare March 3, 2018 20:28
@Johann-S
Copy link
Member Author

Johann-S commented Mar 3, 2018

it's give us something like this in js/coverage/lcov-report/index.html with more details if we choose a file

image

@XhmikosR
Copy link
Member

XhmikosR commented Mar 3, 2018

Shouldn't we have a service like Travis so that we can check quickly things? I'm pretty sure there are various services we could integrate.

@Johann-S
Copy link
Member Author

Johann-S commented Mar 3, 2018

Travis execute it for us see : https://travis-ci.org/twbs/bootstrap/jobs/348736259#L704

@XhmikosR
Copy link
Member

XhmikosR commented Mar 3, 2018

OK, I'm just used to coverage as a repo hook. But this works too.

@Johann-S
Copy link
Member Author

Johann-S commented Mar 3, 2018

I thinks it's a good first step and it's pretty convenient to be able to run the coverage locally , but I'm not against a hook in an other PR

@Johann-S Johann-S force-pushed the v4-dev-johann-coverage branch from b5f5719 to 20f0d91 Compare March 3, 2018 23:59
@Johann-S
Copy link
Member Author

Johann-S commented Mar 4, 2018

Would you like that PR @XhmikosR ? Or do you have any concerns ? If not maybe can you approve my PR 😄

@XhmikosR
Copy link
Member

XhmikosR commented Mar 5, 2018

@Johann-S; just make sure you resolve the conflicts properly :)

@Johann-S Johann-S force-pushed the v4-dev-johann-coverage branch from fb8d7a8 to 9add2bc Compare March 5, 2018 08:55
@Johann-S Johann-S merged commit e43f973 into v4-dev Mar 5, 2018
@Johann-S Johann-S deleted the v4-dev-johann-coverage branch March 5, 2018 09:05
@mdo mdo mentioned this pull request Mar 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants