Serenity-js: Class constructor Cli cannot be invoked without 'new'

Created on 18 Apr 2019  路  7Comments  路  Source: serenity-js/serenity-js

Getting following error -

DevTools listening on ws://127.0.0.1:56872/devtools/browser/bf7318c0-b0a4-4dea-8
ae4-e197dbda68f7
Class constructor Cli cannot be invoked without 'new'
[20:09:31] I/launcher - 0 instance(s) of WebDriver still running
[20:09:31] I/launcher - chrome #01 failed 1 test(s)
[20:09:31] I/launcher - overall: 1 failed spec(s)
[20:09:31] E/launcher - Process exited with error code 1
An unexpected error occurred: undefined

Complete details at - https://stackoverflow.com/questions/55730385/error-while-trying-to-use-serenity-js-class-constructor-cli-cannot-be-invoked

Any help is much appreciated.

@serenity-jcucumber

Most helpful comment

It's mostly feature complete, I'm working on documentation now.

All 7 comments

Based on the information above I'm guessing that your project uses a recent version of Cucumber.js?
If that's the case then please make sure to use Cucumber 1.3 with Serenity 1.x.

Serenity/JS v 2 will support all versions of Cucumber, so 1.x - 5.x, as per the example here.

Let me know if this helps!
Jan

This helped me. Thanx!
@jan-molak what is ETA for Serenity/JS v.2 ?

It's mostly feature complete, I'm working on documentation now.

@jan-molak I am eager to try it. If I add v2.0.1-alpha.64 as dependency, does it expected to work?

@asnov - I'd suggest you go with next to get the latest code. For example:

devDependencies: {
  "@serenity-js/core": "next",
  "@serenity-js/cucumber": "next",
  "@serenity-js/assertions": "next",
  "@serenity-js/protractor": "next"
}

Then follow this example and feel free to reach out if you have any questions or get stuck!

@jan-molak thank you! The example works fine for me. Then I tried to migrate some of my old tests and I didn't find photographer stage crew. What happened to him?

Hey @asnov and @edupeeth! Apologies for not getting back to you sooner, I was snowed under with Serenity/JS 2.0... which is now available (yay!).

Please check out the new project template that gives you support for Protractor and any version of Cucumber.js (0.x - 6.x)

I'd love to hear your thoughts!

Was this page helpful?
0 / 5 - 0 ratings