trentrand / cypress-utils

âš™ Easily parallelize and stress-test your Cypress tests
MIT License
25 stars 6 forks source link

Support for .feature files #15

Closed alastorohlin closed 3 years ago

alastorohlin commented 3 years ago

Hi everyone, In my project I use .feature files for my tests. 🥒

When I try to execute $(npm bin)/cypress-utils stress-test path/to/file.feature I got this error:

.../node_modules/cypress-utils/index.js:185
argv.testFiles = argv.testFiles ?? cypressConfig.testFiles ?? '**/*.*';
                                 ^

SyntaxError: Unexpected token '?'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47

On my Cypress.json I have this properties:

"testFiles": "**/*.feature",
"integrationFolder": "src/test/resources/"

Does this plugin only works with spec.js files?

Thanks 😄

trentrand commented 3 years ago

Hey Arnold. There should not be any issues with the .feature filename prefix, it looks like you've configured that correctly!

The error you're seeing is caused by the use of the nullish coalescing operator. This language feature is only available on NodeJS version 14.0.0 or newer.

This is a duplicate of issue #17.

I've updated the package.json file to include this node engine version requirement. See commit ef64600.

trentrand commented 3 years ago

This has been fixed in version 2.1.1.

Be sure to use Node 14.0.0 or newer!

Thank you for reporting the issue!