Skip to content

Running multiple features with webpack bundler throws error #694

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

Closed
jp7677 opened this issue Apr 13, 2022 · 4 comments
Closed

Running multiple features with webpack bundler throws error #694

jp7677 opened this issue Apr 13, 2022 · 4 comments

Comments

@jp7677
Copy link
Contributor

jp7677 commented Apr 13, 2022

Hi there,

Running the cypress-cucumber-preprocessor with the webpack example provided here https://github.com/badeball/cypress-cucumber-preprocessor/tree/master/examples/webpack works perfectly. Though as soon as you add a second feature file, e.g. by just making a copy of the duckduckgo.feature and duckduckgo.ts files, running all integration tests fails with Expected to find an error message (this might be a bug, please report at https://github.com/badeball/cypress-cucumber-preprocessor). Note that running the features separately works fine. It is really just the run-all that fails.

The error as presented in Cypress is:

Expected to find an error message (this might be a bug, please report at https://github.com/badeball/cypress-cucumber-preprocessor)

Because this error occurred during a after each hook we are skipping all of the remaining tests. 
node_modules/@badeball/cypress-cucumber-preprocessor/lib/assertions.js:7:1
   5 | const package_json_1 = require("../package.json");
   6 | function fail(message) {
>  7 |     throw new Error(`${message} (this might be a bug, please report at ${package_json_1.homepage})`);
     | ^
   8 | }
   9 | exports.fail = fail;
  10 | function assert(value, message) {

Current behavior

See this screenshot what happens when running all tests.

Screenshot from 2022-04-13 14-03-10

Desired behavior

Running all tests should succeed with multiples feature files.

Test code to reproduce

As stated above, just making a copy of the feature/ts files in https://github.com/badeball/cypress-cucumber-preprocessor/tree/master/examples/webpack is sufficient to reproduce this behavior.

Versions

  • Cypress version: 9.5.4
  • Preprocessor version: 9.0.0
  • Node version: v16.14.2
@badeball
Copy link
Owner

badeball commented Apr 13, 2022

Hey @jp7677, thanks for the feedback! I've released v9.0.1 that fixes this.

@jp7677
Copy link
Contributor Author

jp7677 commented Apr 13, 2022

Thanks a lot, that was really fast!
I'm curious what caused this, do you have a link to the commit?

@badeball
Copy link
Owner

Ouf, looks like I was a biit too quick there. v9.0.1 doesn't actually contain the fix, it's basically identical to v9.0.0. I've released v9.0.2 now, which contains 49e9723.

@jp7677
Copy link
Contributor Author

jp7677 commented Apr 13, 2022

I can confirm that version 9.0.2 does indeed fixes this, thanks a lot for the very fast help!

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

No branches or pull requests

2 participants