ctrf-io / cypress-ctrf-json-reporter

A Cypress JSON test results reporter that follows the CTRF schema
https://ctrf.io
MIT License
7 stars 2 forks source link

Cannot use GenerateCtrfReport and documentation issue #14

Closed NinjaQaSa closed 3 months ago

NinjaQaSa commented 3 months ago

Hi,

I've been going through the documentation trying to implement the reporter and I've run into the below issue.

The documentation says we must run:

npm install --save-dev cypress-ctrf-json-reporter

however, in the import/require statement, it asks us to import: 'cypress-ctrf-json-report' - note the 'er' is missing - this is when comparing to the package name.

The initial import asks us to import generateCtrfJsonReport, but this method does not exist in the code as far as I can see. Doing a brief run through, the code has the method GenerateCtrfReport exported instead of generateCtrfJsonReport

When I make the above updates with importing, I run into this error:

image

Please let me know if I am missing out on anything or using this incorrectly. It will be greatly appreciated.

NinjaQaSa commented 3 months ago

This is how I fixed it: image

Ma11hewThomas commented 3 months ago

Thanks for your feedback @NinjaQaSa - the documentation has been amended