kozhevnikov / cucumber-pretty

Cucumber.js Pretty Formatter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cucumber Pretty 1.6.0 no longer works with Cucumber 5.1.0

harishraok opened this issue · comments

Cucumber Pretty 1.6.0 no longer works with Cucumber 5.1.0

Can we have the backward compatibility with Cucumber Pretty? As we are using Protractor-cucumber-framework which is still not pdated.

Getting the below error message.
E/launcher - Error: TypeError: options.eventDataCollector.getTestCaseAttempt is not a function

11-Oct-2019 12:47:43 | at EventEmitter.PrettyFormatter.options.eventBroadcaster.on (D:\Atlassian\Data\BambooRemoteAgentHome\xml-data\build-dir\ADV-APU0-SC\node_modules\cucumber-pretty\index.js:52:70)
11-Oct-2019 12:47:43 | at emitOne (events.js:116:13)
11-Oct-2019 12:47:43 | at EventEmitter.emit (events.js:211:7)

For Cucumber.js versions 3 to 5 please use cucumber-pretty 1.5.
For Cucumber.js version 6 (latest) please use cucumber-pretty 6 (latest).

You can either update Cucumber.js to the latest version or install specific version of cucumber-pretty with cucumber-pretty@<version> --save-exact command.

npm install cucumber-pretty@1.5.2 --save-exact

You should get a warning when trying to install cucumber-pretty@6 without cucumber@6 because it declares "peerDependencies": { "cucumber": ">=6.0.0" }.

I've unpublished 1.6.0 and published it as 6.0.0 so any existing installs with default ^1.5.2 version range will continue to work as before. If you ever update to cucumber@6 then you need to install cucumber-pretty@6 as well since ^ range does not automatically update major version.