-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add timeout option to xits using arrow functions #3142
Comments
Is this a documented API? I don't recall ever seeing anyone use this before. |
anyway, this looks pretty trivial to address. I'm going to call it a bug even though it's more of an "internal consistency" issue, since we don't necessarily expect consumers to use the object returned from |
@boneskull this is a very interesting side effect of returning the test object from inside the |
@Bamieh I've already got one ready ;) |
@Bamieh beat me to it |
* Fixes #3142 * added test cases suggested by @boneskull * fixed miswording * attempt to fix bizarre AppVeyor problem by way of npm upgrade
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#​410--2017-12-28) [Compare Source](mochajs/mocha@v4.0.1...v4.1.0) This is mainly a "housekeeping" release. Welcome [@​Bamieh] and [@​xxczaki] to the team! #### 🐛 Fixes - [#​2661]: `progress` reporter now accepts reporter options ([@​canoztokmak]) - [#​3142]: `xit` in `bdd` interface now properly returns its `Test` object ([@​Bamieh]) - [#​3075]: Diffs now computed eagerly to avoid misinformation when reported ([@​abrady0]) - [#​2745]: `--help` will now help you even if you have a `mocha.opts` ([@​Zarel]) #### 🎉 Enhancements - [#​2514]: The `--no-diff` flag will completely disable diff output ([@​CapacitorSet]) - [#​3058]: All "setters" in Mocha's API are now also "getters" if called without arguments ([@​makepanic]) #### 📖 Documentation - [#​3170]: Optimization and site speed improvements ([@​Munter]) - [#​2987]: Moved the old [site repo](https://github.com/mochajs/mochajs.github.io) into the main repo under `docs/` ([@​boneskull]) - [#​2896]: Add [maintainer guide](https://github.com/mochajs/mocha/blob/master/MAINTAINERS.md) ([@​boneskull]) - Various fixes and updates ([@​xxczaki], [@​maty21], [@​leedm777]) #### 🔩 Other - Test improvements and fixes ([@​eugenet8k], [@​ngeor], [@​38elements], [@​Gerhut], [@​ScottFreeCode], [@​boneskull]) - Refactoring and cruft excision ([@​38elements], [@​Bamieh], [@​finnigantime], [@​boneskull]) [#​2661]: `https://github.com/mochajs/mocha/issues/2661` [#​3142]: `https://github.com/mochajs/mocha/issues/3142` [#​3075]: `https://github.com/mochajs/mocha/pull/3075` [#​2745]: `https://github.com/mochajs/mocha/issues/2745` [#​2514]: `https://github.com/mochajs/mocha/issues/2514` [#​3058]: `https://github.com/mochajs/mocha/issues/3058` [#​3170]: `https://github.com/mochajs/mocha/pull/3170` [#​2987]: `https://github.com/mochajs/mocha/issues/2987` [#​2896]: `https://github.com/mochajs/mocha/issues/2896` [@​canoztokmak]: https://github.com/canoztokmak [@​Bamieh]: https://github.com/Bamieh [@​abrady0]: https://github.com/abrady0 [@​Zarel]: https://github.com/Zarel [@​CapacitorSet]: https://github.com/CapacitorSet [@​xxczaki]: https://github.com/xxczaki [@​maty21]: https://github.com/maty21 [@​leedm777]: https://github.com/leedm777 [@​eugenet8k]: https://github.com/eugenet8k [@​38elements]: https://github.com/38elements [@​Gerhut]: https://github.com/Gerhut [@​finnigantime]: https://github.com/finnigantime --- </details> --- This PR has been generated by [Renovate Bot](https://renovatebot.com).
… (mochajs#3143) * Fixes mochajs#3142 * added test cases suggested by @boneskull * fixed miswording * attempt to fix bizarre AppVeyor problem by way of npm upgrade
Prerequisites
common mistake
labelnode node_modules/.bin/mocha --version
(Local) andmocha --version
(Global). We recommend avoiding the use of globally installed Mocha.Description
When using the arrow function syntax to override the default timeout. You specifiy it on the return value of the it function.
But if we want to ignore the test by adding an x we get an exception, which is annoying.
Steps to Reproduce
Expected behavior: The test should be ignored
Actual behavior: We get an exception
Reproduces how often: 100%
Versions
mocha 4.0.1
The text was updated successfully, but these errors were encountered: