question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mocha-junit-reporter option doesn't work

See original GitHub issue

Current behavior:

mocha-junit-reporter always sets name="<fullTitle>" and classname="<title>" regardless of testCaseSwitchClassnameAndName option value.

Option is described here: https://github.com/michaelleeallen/mocha-junit-reporter Here is mocha-junit-reporter code: https://github.com/michaelleeallen/mocha-junit-reporter/blob/c55dc223886ec2cd050d5011e6e61c52d75d4371/index.js#L190

Desired behavior:

should switch name and classname when testCaseSwitchClassnameAndName is true

Steps to reproduce:

cypress.json:

{
  "reporter": "junit",
  "reporterOptions": {
    "mochaFile": "results/[hash].xml",
    "testCaseSwitchClassnameAndName": true
  }
}

Versions

Cypress: 3.0.2 Browser: Electron 59 (headless)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
jennifer-shehanecommented, Jul 26, 2018

@Karolis92 Why is it that you have reporter option set to junit and not set to mocha-junit-reporter?

1reaction
Karolis92commented, Apr 2, 2019

Sorry, not working with that project anymore 😃 But like I said, we have put reporter dependencies to our project to be independent from cypress updates 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

mocha-junit-reporter - npm
A JUnit reporter for mocha.. Latest version: 2.2.0, last published: a month ago. Start using mocha-junit-reporter in your project by running ...
Read more >
Mocha JUnit reporter UnhandledPromiseRejectionWarning
I'm trying to make this example work in my Azure Devops Pipeline. https://mochajs.org/#getting-started. First I tried to have my own tests ...
Read more >
cypress-io/cypress - Gitter
Hi guys, I'm trying to have multiple reporter (HTML & xml) using mochawesome and mocha-multi-reporters but I'm keep getting error Cannot set property...
Read more >
Mocha documentation — DevDocs
npm install mocha $ mkdir test $ $EDITOR test/test.js # or open with your ... Mocha validates any custom reporters or interfaces which...
Read more >
Detect, track, and eliminate flaky Mocha tests - BuildPulse
Generate JUnit XML reports for test results · Add mocha-junit-reporter and mocha-multi-reporters as development dependencies. · Create a mocha-reporter-config.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found