Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mocha -h doesn't always display help #2745

Closed
Zarel opened this issue Mar 17, 2017 · 2 comments
Closed

mocha -h doesn't always display help #2745

Zarel opened this issue Mar 17, 2017 · 2 comments
Labels
status: waiting for author waiting on response from OP - more information needed type: bug a defect, confirmed by a maintainer

Comments

@Zarel
Copy link
Contributor

Zarel commented Mar 17, 2017

Pretty straightforward testcase:

zarel@Phenylalanine ~> mocha -h

  Usage: mocha [debug] [options] [files]

  [...]

zarel@Phenylalanine ~> mkdir test
zarel@Phenylalanine ~> echo "test" > test/mocha.opts
zarel@Phenylalanine ~> mocha -h
No test files found

In other words, if test/mocha.opts exists, mocha -h won't display help.

Zarel added a commit to Zarel/mocha that referenced this issue Mar 17, 2017
Previously, having options in `test/mocha.opts` would add those to `process.argv` to be passed to `program.parse`, which would make it stop showing help.

Fixes mochajs#2745
@drazisil drazisil added type: bug a defect, confirmed by a maintainer unconfirmed and removed unconfirmed labels Mar 30, 2017
Zarel added a commit to Zarel/mocha that referenced this issue Jun 14, 2017
Previously, having options in `test/mocha.opts` would add those to `process.argv` to be passed to `program.parse`, which would make it stop showing help.

Fixes mochajs#2745
@stale
Copy link

stale bot commented Oct 17, 2017

I am a bot that watches issues for inactivity.
This issue hasn't had any recent activity, and I'm labeling it stale. In 14 days, if there are no further comments or activity, I will close this issue.
Thanks for contributing to Mocha!

@stale stale bot added the stale this has been inactive for a while... label Oct 17, 2017
@Zarel
Copy link
Contributor Author

Zarel commented Oct 17, 2017

There is a pull request for a fix. The only reason it hasn't been merged yet is because Node 0.10 doesn't support the method used to test it.

@stale stale bot removed the stale this has been inactive for a while... label Oct 17, 2017
Zarel added a commit to Zarel/mocha that referenced this issue Oct 17, 2017
Previously, having options in `test/mocha.opts` would add those to `process.argv` to be passed to `program.parse`, which would make it stop showing help.

Fixes mochajs#2745
ScottFreeCode pushed a commit that referenced this issue Oct 18, 2017
* Make sure `mocha -h` consistently shows help

Previously, having options in `test/mocha.opts` would add those to `process.argv` to be passed to `program.parse`, which would make it stop showing help.

Fixes #2745
OmgImAlexis pushed a commit to agenda/agenda that referenced this issue Jun 26, 2018
This Pull Request updates dependency [mocha](https://github.com/mochajs/mocha) from `v4.0.1` to `v4.1.0`



<details>
<summary>Release Notes</summary>

### [`v4.1.0`](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md#&#8203;410--2017-12-28)
[Compare Source](mochajs/mocha@v4.0.1...v4.1.0)
This is mainly a "housekeeping" release.

Welcome [@&#8203;Bamieh] and [@&#8203;xxczaki] to the team!
#### 🐛 Fixes

- [#&#8203;2661]: `progress` reporter now accepts reporter options ([@&#8203;canoztokmak])
- [#&#8203;3142]: `xit` in `bdd` interface now properly returns its `Test` object ([@&#8203;Bamieh])
- [#&#8203;3075]: Diffs now computed eagerly to avoid misinformation when reported ([@&#8203;abrady0])
- [#&#8203;2745]: `--help` will now help you even if you have a `mocha.opts` ([@&#8203;Zarel])
#### 🎉 Enhancements

- [#&#8203;2514]: The `--no-diff` flag will completely disable diff output ([@&#8203;CapacitorSet])
- [#&#8203;3058]: All "setters" in Mocha's API are now also "getters" if called without arguments ([@&#8203;makepanic])
#### 📖 Documentation

- [#&#8203;3170]: Optimization and site speed improvements ([@&#8203;Munter])
- [#&#8203;2987]: Moved the old [site repo](https://github.com/mochajs/mochajs.github.io) into the main repo under `docs/` ([@&#8203;boneskull])
- [#&#8203;2896]: Add [maintainer guide](https://github.com/mochajs/mocha/blob/master/MAINTAINERS.md) ([@&#8203;boneskull])
- Various fixes and updates ([@&#8203;xxczaki], [@&#8203;maty21], [@&#8203;leedm777])
#### 🔩 Other

- Test improvements and fixes ([@&#8203;eugenet8k], [@&#8203;ngeor], [@&#8203;38elements], [@&#8203;Gerhut], [@&#8203;ScottFreeCode], [@&#8203;boneskull])
- Refactoring and cruft excision ([@&#8203;38elements], [@&#8203;Bamieh], [@&#8203;finnigantime], [@&#8203;boneskull])

[#&#8203;2661]: `mochajs/mocha#2661
[#&#8203;3142]: `mochajs/mocha#3142
[#&#8203;3075]: `mochajs/mocha#3075
[#&#8203;2745]: `mochajs/mocha#2745
[#&#8203;2514]: `mochajs/mocha#2514
[#&#8203;3058]: `mochajs/mocha#3058
[#&#8203;3170]: `mochajs/mocha#3170
[#&#8203;2987]: `mochajs/mocha#2987
[#&#8203;2896]: `mochajs/mocha#2896
[@&#8203;canoztokmak]: https://github.com/canoztokmak
[@&#8203;Bamieh]: https://github.com/Bamieh
[@&#8203;abrady0]: https://github.com/abrady0
[@&#8203;Zarel]: https://github.com/Zarel
[@&#8203;CapacitorSet]: https://github.com/CapacitorSet
[@&#8203;xxczaki]: https://github.com/xxczaki
[@&#8203;maty21]: https://github.com/maty21
[@&#8203;leedm777]: https://github.com/leedm777
[@&#8203;eugenet8k]: https://github.com/eugenet8k
[@&#8203;38elements]: https://github.com/38elements
[@&#8203;Gerhut]: https://github.com/Gerhut
[@&#8203;finnigantime]: https://github.com/finnigantime

---

</details>




---

This PR has been generated by [Renovate Bot](https://renovatebot.com).
sgilroy pushed a commit to TwineHealth/mocha that referenced this issue Feb 27, 2019
* Make sure `mocha -h` consistently shows help

Previously, having options in `test/mocha.opts` would add those to `process.argv` to be passed to `program.parse`, which would make it stop showing help.

Fixes mochajs#2745
@JoshuaKGoldberg JoshuaKGoldberg added status: waiting for author waiting on response from OP - more information needed and removed status: pr needs work labels Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting for author waiting on response from OP - more information needed type: bug a defect, confirmed by a maintainer
Projects
None yet
Development

No branches or pull requests

3 participants