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.

false alert on mocha-jenkins-reporter (cant seem to add `help wanted` label)

See original GitHub issue

mocha-jenkins-reporter is reported as being unused.

npx depcheck --json:

{
  "dependencies": [],
  "devDependencies": [
    "mocha-jenkins-reporter"
  ],
  "missing": {},
  "using": {
    "depcheck": [
      "/Users/carrie.prebble/Downloads/depcheck-mocha-jenkins-reporter/package.json"
    ],
    "mocha": [
      "/Users/carrie.prebble/Downloads/depcheck-mocha-jenkins-reporter/package.json"
    ],
    "chai": [
      "/Users/carrie.prebble/Downloads/depcheck-mocha-jenkins-reporter/someCode.spec.js"
    ]
  },
  "invalidFiles": {},
  "invalidDirs": {}
}

When I remove this dependency and run my tests, I get the following error:

"mocha-jenkins-reporter" reporter not found
/Users/carrie.prebble/source/share-my-data/node_modules/mocha/lib/mocha.js:193
      throw new Error('invalid reporter "' + reporter + '"');
      ^
Error: invalid reporter "mocha-jenkins-reporter"
    at Mocha.reporter (/Users/carrie.prebble/source/share-my-data/node_modules/mocha/lib/mocha.js:193:13)
...

mocha-jenkins-reporter is used for Node.js backend tests using mocha to output nicely formatted Jenkins reports of the test runs

It’s used in our package.json test script:

"test": "JUNIT_REPORT_PATH=./jenkins-test-results.xml mocha \"*.spec.js\" --colors --reporter mocha-jenkins-reporter"

The attached project is a trivial example to reproduce the false alert issue.

To reproduce:

  1. unpack depcheck-mocha-jenkins-reporter.zip
  2. yarn
  3. yarn package

depcheck-mocha-jenkins-reporter.zip

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
mnkhouricommented, Sep 7, 2018

/mocha .*–reporter ([A-Za-z0-9_-]+)/

we should also check for --require, as described in this issue: https://github.com/depcheck/depcheck/issues/241

I’m having a hard time determining from the mocha docs if there are any others we should include too, maybe there are more

0reactions
rumplcommented, Sep 6, 2018

I guess we could add it here indeed

Read more comments on GitHub >

github_iconTop Results From Across the Web

depcheck | Yarn - Package Manager
#349; peerDepdencies of a used package not considered #341; false alert on mocha-jenkins-reporter (cant seem to add help wanted label) #287; Symlinked files ......
Read more >
GitHub's "Help wanted" label: What if I want help on all issues?
So in a nutshell, I tag with "help wanted", "easy" and "good first issue" selectively to help and only to help new contributors...
Read more >
mochawesome/general - Gitter
@adamgruber I am using Cypress.io as my testing tool and they support mochawesome -v 1.5.3 which doesn't seems to have option for time...
Read more >
Experts for omit lodash - Linknovate
Name Score News GitHub 85.1 8 Dave Gibbons Ltd. 68.8 3 Conflict Resolution 54.2 2
Read more >
nuka-carousel | Pure React Carousel Component - kandi
Support. nuka-carousel has a medium active ecosystem. ... ({ viewPopup: true}); } render() { return(<Modal aria-labelledby='modal-label' autoFocus={false} ...
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