Skip to content

Wrong export for codeceptjs cli reporter #1361

@xeonarno

Description

@xeonarno

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')
            }
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions