Open jRichardeau opened 1 year ago
Thanks for reporting!
Even though we encourage folks to use ESM (at least for their testing) I understand that this is sometimes not feasible. Therefore if you can provide a PR that compiles two versions of this reporter (one ESM and the other CJS) we are happy to merge and release that.
We greatly appreciate any contributions that help resolve the bug. While we understand that active contributors have their own priorities, we kindly request your assistance if you rely on this bug being fixed. We encourage you to take a look at our contribution guidelines or join our friendly Discord development server, where you can ask any questions you may have. Thank you for your support, and cheers!
Environment (please complete the following information):
Config of webdriver.io and the reporter I'm trying to create a custom reporter that extends
wdio-cucumberjs-json-reporter
to overload some behaviors.Describe the bug The problem occurs when trying to import
CucumberJsJson
from a file imported as a commonJS module because as you can see in this file ofwdio-cucumberjs-json-reporter
, the commonJS version of the module only exports theattach
static method.The created reporter is so invalid and does not contain methods like
emit
or others that should be inherited from WDIO as in the "non commonJS" version.To Reproduce Import
wdio-cucumberjs-json-reporter
from a commonJS module, you will see that onlyattach
method is available.Expected behavior Both "non commonJS" and commonJS versions of this module should export the same api.
Thank you