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

normalize setters and getters #3058

Closed
boneskull opened this issue Oct 6, 2017 · 0 comments · Fixed by #3064
Closed

normalize setters and getters #3058

boneskull opened this issue Oct 6, 2017 · 0 comments · Fixed by #3064
Labels
semver-minor implementation requires increase of "minor" version number; "features" status: accepting prs Mocha can use your help with this one! type: chore generally involving deps, tooling, configuration, etc.

Comments

@boneskull
Copy link
Contributor

The main classes (Runnable, Test, Context, Suite, Mocha, etc.) have these setter/getter functions, e.g. Runnable#timeout(). Not all of these, however, implement the "getter" part, where it's supposed to just return the value if it receives no arguments.

Furthermore, there are some methods that might check if the first argument is undefined; they need to check length of arguments instead, because undefined or void 0 is a valid argument.

@boneskull boneskull added type: chore generally involving deps, tooling, configuration, etc. status: accepting prs Mocha can use your help with this one! semver-minor implementation requires increase of "minor" version number; "features" labels Oct 6, 2017
makepanic added a commit to makepanic/mocha that referenced this issue Oct 9, 2017
makepanic added a commit to makepanic/mocha that referenced this issue Oct 9, 2017
makepanic added a commit to makepanic/mocha that referenced this issue Oct 16, 2017
makepanic added a commit to makepanic/mocha that referenced this issue Oct 18, 2017
OmgImAlexis referenced this issue in agenda/agenda 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]: `https://github.com/mochajs/mocha/issues/2661`
[#&#8203;3142]: `https://github.com/mochajs/mocha/issues/3142`
[#&#8203;3075]: `https://github.com/mochajs/mocha/pull/3075`
[#&#8203;2745]: `https://github.com/mochajs/mocha/issues/2745`
[#&#8203;2514]: `https://github.com/mochajs/mocha/issues/2514`
[#&#8203;3058]: `https://github.com/mochajs/mocha/issues/3058`
[#&#8203;3170]: `https://github.com/mochajs/mocha/pull/3170`
[#&#8203;2987]: `https://github.com/mochajs/mocha/issues/2987`
[#&#8203;2896]: `https://github.com/mochajs/mocha/issues/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-minor implementation requires increase of "minor" version number; "features" status: accepting prs Mocha can use your help with this one! type: chore generally involving deps, tooling, configuration, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant