-
Notifications
You must be signed in to change notification settings - Fork 66
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
#227: Webpack code coverage support #266
base: dev
Are you sure you want to change the base?
Conversation
packages/e2e-cypress/src/index.js
Outdated
// See https://www.npmjs.com/package/istanbul-instrumenter-loader | ||
// https://github.com/vuejs/vue-cli/issues/1363#issuecomment-405352542 | ||
// https://github.com/akoidan/vue-webpack-typescript | ||
if (api.hasWebpack === true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@IlCallo When I've tried then hasWebpack
condition was undefined. How can I set it according to the project's setting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hasWebpack
is undefined into q/app projects, but should be defined into all others
We could actually just remove hasWebpack
and only rely on hasVite
: if hasVite
is false or undefined, then the project will automatically be webpack-based
packages/e2e-cypress/package.json
Outdated
@@ -44,6 +44,7 @@ | |||
}, | |||
"devDependencies": { | |||
"@types/lodash": "^4.14.178", | |||
"coverage-istanbul-loader": "^3.0.5", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember that the Cypress AE devDeps are the ones which are used into dev phase of the app extension, while packages which must be used into userland project must go into the app extension normal dependencies
So this package should be moved to dependencies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I fixed it.
packages/e2e-cypress/src/index.js
Outdated
// See https://www.npmjs.com/package/istanbul-instrumenter-loader | ||
// https://github.com/vuejs/vue-cli/issues/1363#issuecomment-405352542 | ||
// https://github.com/akoidan/vue-webpack-typescript | ||
if (api.hasWebpack === true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hasWebpack
is undefined into q/app projects, but should be defined into all others
We could actually just remove hasWebpack
and only rely on hasVite
: if hasVite
is false or undefined, then the project will automatically be webpack-based
packages/e2e-cypress/src/index.js
Outdated
loader: '@jsdevtools/coverage-istanbul-loader', | ||
options: { esModules: true }, | ||
enforce: 'post', | ||
include: path.join(__dirname, '..', '..', '..', '..', 'src'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems off, the include (provided the exclude isn't enough on its own) should be relative the the user folder, not to this AE location
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed include
property and I extended exlcude
with .quasar folder. Now it seems to be working with this setting.
Thanks for the contribution :) |
@IlCallo I fixed the requested changes please check them. |
hi @gtrombitas, and thanks for the PR, I have run some tests on it. |
@maiolica Thank you for the review and testing effort. Unfortunately I couldn't find any other solutions to handle |
I'm regularly checking that issue, but the project seems abandoned since 2020 Is there any reliable alternative into JS ecosystem? |
Thanks for the sync-up. Yes, I have seen the same thing at Istanbul repo. |
What kind of change does this PR introduce? (check at least one)
If you are adding a new test runner, have you...? (check all)
/packages/base/runners.json
?/README.md
?baseline.spec.vue
?Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
dev
branch and not themaster
branchfix: #xxx[,#xxx]
, where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information: