問題タブ [reporters]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
692 参照

javascript - WebdriverIO カスタム レポーター - TypeError: Class extends value # is not a constructor or null

I am setting up a custom reporter in WebdriverIO. This is currently my code:

let WDIOReporter = require ('@wdio/reporter');



I am setting up a custom reporter in WebdriverIO. This is currently my code:

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?


A few days back tried to achieve the same. Here is the way it worked for me The correct way to export is in index.js:

In Main.js