I am setting up a custom reporter in WebdriverIO. This is currently my code:
let WDIOReporter = require ('@wdio/reporter');
module.exports = class HTMLReporter extends WDIOReporter {
constructor (options) {
super(options);
console.log('initialized custom reporter with the following reporter options: ', options);
}
}
When I run my program, I get the following error:
TypeError: Class extends value #<Object> is not a constructor or null
at Object.<anonymous> (C:...\reporting\index.js:3:45)
This seems to be causing an error at the module.exports = class HTMLReporter extends WDIOReporter
line.
How can I fix this issue? What am I doing wrong?