-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Not compatible with @cypress/code-coverage #198
Comments
I can't reproduce this, it works for me Maybe you need to add to support as well as plugins see |
closing for now - please add more details, steps to reproduce, and reopen if appropriate |
I'm running in to similar issues, a bit more context here:
@jcundill seems that I cannot reopen :) |
Seems that it also happens if I create a simple feature in English:
Looks like it's somehow meddling with the parser |
"cypress-cucumber-preprocessor": {
"nonGlobalStepDefinitions": true,
"stepDefinitions": "cypress/integration",
"cucumberJson": {
"generate": true,
"outputFolder": "dist/cypress/cucumber-json",
"filePrefix": "",
"fileSuffix": ".cucumber"
}
},
"devDependencies": {
"cypress": "^3.8.2",
"cypress-cucumber-preprocessor": "^2.0.1",
} the cypress and cypress-cucumber parts of my config (btw. as a side note, is there a way to get the |
Aaaaaand, I need to find something solid to bang my head against :p Read and followed these instructions without thinking: https://docs.cypress.io/guides/tooling/code-coverage.html#Install-the-plugin so I ended up with: const cucumber = require('cypress-cucumber-preprocessor').default
module.exports = (on, config) => {
on('file:preprocessor', cucumber())
}
module.exports = (on, config) => {
on('task', require('@cypress/code-coverage/task'))
} instead of something sensible like: const cucumber = require('cypress-cucumber-preprocessor').default
const coverage = require('@cypress/code-coverage/task')
module.exports = (on, config) => {
on('file:preprocessor', cucumber())
on('task', coverage())
} in my |
Nothing to sorry about, I've just run into the same problem and your answer was the only one on the whole internet that helped me to solve this damn problem. I've ended up with the following plugins/index.js and it finally worked: const cucumber = require('cypress-cucumber-preprocessor').default
// todo check for cucumber problem
module.exports = (on, config) => {
require('@cypress/code-coverage/task')(on, config)
on('file:preprocessor', cucumber())
// include any other plugin code...
// It's IMPORTANT to return the config object
// with any changed environment variables
return config
} I need to learn Javascript better :/ |
I've tried with |
When I add following in
cypress/plugins/index.js
It gives compilation error "ParseError: Unexpected token"
The text was updated successfully, but these errors were encountered: