CodeceptJS icon indicating copy to clipboard operation
CodeceptJS copied to clipboard

Wrong export for codeceptjs cli reporter

Open xeonarno opened this issue 8 years ago • 1 comments

What are you trying to achieve?

just a test

What do you get instead?

TypeError: this._reporter is not a constructor
    at Mocha.run (./node_modules/codeceptjs/node_modules/mocha/lib/mocha.js:544:18)
    at Codecept.run (./node_modules/codeceptjs/lib/codecept.js:161:11)

Provide test source code if related I use mocha-multi as reporter

// in lib/reporter/cli.js
// L.132
module.exports = function (runner, opts) {
  return new Cli(runner, opts);
};

should be

// in lib/reporter/cli.js
// L.132
module.exports = Cli(runner, opts);

Details

  • CodeceptJS version: 1.4.5
  • NodeJS Version: 10.11
  • Operating System: OSX mojave
  • Protractor
  • Configuration file: /
module.exports = {
    reporterOptions:{
        "codeceptjs-cli-reporter":{
            stdout:"-",
            options:{
                "verbose":false,
                "steps":true,
            }
        },
        "mochawesome":{
            stdout:"-",
            options:{
                "reportDir": "./"+path.join(process.env.REPORTS_DIR, 'html'),
                "reportFilename": "index"
            }
        },
        "xunit":{
            stdout:"-",
            options:{
                "output":"./"+path.join(process.env.REPORTS_DIR, 'xunit.xml')
            }
        }
    }
}

xeonarno avatar Dec 01 '18 00:12 xeonarno

Sorry... wrong diagnostic !

xeonarno avatar Dec 01 '18 01:12 xeonarno