mocha-jenkins-reporter icon indicating copy to clipboard operation
mocha-jenkins-reporter copied to clipboard

NaNms printed when run with --dry-run

Open dnoliver opened this issue 2 years ago • 0 comments

Running with spec reporter

$ npx mocha ./workflows/test.js --dry-run --reporter spec

  @016 Test
    ✔ #001 Step 1
    ✔ #002 Step 2
    ✔ #003 Step 3
    ✔ #004 Step 4

Running with mocha-multi-reporters, using mocha-jenkins-reporter

$ npx mocha ./workflows/test.js --dry-run --reporter mocha-multi-reporters --reporter-option configFile=config.json

  @016 Test
      ✔ #001 Step 1: NaNms
      ✔ #002 Step 2: NaNms
      ✔ #003 Step 3: NaNms
      ✔ #004 Step 4: NaNms

This is the multi-reporter configuration:

{
    "reporterEnabled": "mocha-jenkins-reporter, @mochajs/json-file-reporter",
    "mochaJenkinsReporterReporterOptions": {
        "junit_report_path": "test-results.xml",
        "junit_report_name": "Tests",
        "junit_report_stack": "1"
    },
    "mochajsJsonFileReporterReporterOptions": {
        "output": "test-results.json"
    }
}

When you use the spec reporter provided by this plugin, you get those NaNms durations.

dnoliver avatar Aug 15 '22 17:08 dnoliver