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

Cucumber 8 support #75

Closed
Crow-EH opened this issue Oct 20, 2021 · 1 comment · Fixed by #76
Closed

Cucumber 8 support #75

Crow-EH opened this issue Oct 20, 2021 · 1 comment · Fixed by #76

Comments

@Crow-EH
Copy link
Contributor

Crow-EH commented Oct 20, 2021

Cucumber 8.0.0 will be released in the near future and is currently available on npm as a release candidate.

We should support it, with or without cucumber 7.x.x depending on the compatibility issues.

Trying to support it now could allow us to officially support it when it's released.

I tested 8.0.0-rc.1 on a project using veggies 1.0.1, and I got this error when launching the tests :

node:internal/modules/cjs/loader:488
      throw e;
      ^

Error: Cannot find module '/usr/src/app/node_modules/@cucumber/cucumber/lib/cli.js'
    at createEsmNotFoundErr (node:internal/modules/cjs/loader:960:15)
    at finalizeEsmResolution (node:internal/modules/cjs/loader:953:15)
    at resolveExports (node:internal/modules/cjs/loader:482:14)
    at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/usr/src/app/node_modules/@ekino/veggies/src/cli/index.js:4:21)
    at Module._compile (node:internal/modules/cjs/loader:1101:14) {
  code: 'MODULE_NOT_FOUND',
  path: '/usr/src/app/node_modules/@cucumber/cucumber/package.json'
}

It might be on my side though, any additional tests welcome !

@fthouraud
Copy link
Contributor

My test leads to the same problem. However, the behavior is a bit strange when running the test-cli script of Veggies.

It seems to pass the import step but cucumber does not recognize the custom steps...

1) Scenario: Should prevent snapshots creation # tests/cli/features/veggies.feature:3
   ? When I run command yarn veggies --require tests/cli/support tests/cli/dummy_features --tags @preventSnapshotsCreation --preventSnapshotsCreation
       Undefined. Implement with the following snippet:

         When('I run command yarn veggies --require tests\/cli\/support tests\/cli\/dummy_features --tags @preventSnapshotsCreation --preventSnapshotsCreation', function () {
           // Write code here that turns the phrase above into concrete actions
           return 'pending';
         });

[...]

I think it could be related to cucumber/cucumber-js#1649 which adds support for ESM into Cucumber. We should expect breaking changes. 😱

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants