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

import/require xit, fixes #2972 #2997

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/mocha.js
Expand Up @@ -204,6 +204,7 @@ Mocha.prototype.ui = function (name) {
exports.before = context.before || context.suiteSetup;
exports.describe = context.describe || context.suite;
exports.it = context.it || context.test;
exports.xit = context.xit || context.test.skip;
exports.setup = context.setup || context.beforeEach;
exports.suiteSetup = context.suiteSetup || context.before;
exports.suiteTeardown = context.suiteTeardown || context.after;
Expand Down
1 change: 1 addition & 0 deletions mocha.js
Expand Up @@ -1464,6 +1464,7 @@ Mocha.prototype.ui = function (name) {
exports.before = context.before || context.suiteSetup;
exports.describe = context.describe || context.suite;
exports.it = context.it || context.test;
exports.xit = context.xit || context.test;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small tip: you don't actually have to update the mocha.js file at the base of the project, as it is generated from the other files as part of the publication process. (On the other hand, for the same reason, you don't have to not update it either -- it will simply be overwritten later, as long as you update the other files in addition. I just mention this because it's useful to know you don't have search through the gigantic bundle for the code to update and do have to update other files for changes to actually be picked up.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ScottFreeCode Updated the PR with suggested changes. This time not updated mocha.js at root level.

exports.setup = context.setup || context.beforeEach;
exports.suiteSetup = context.suiteSetup || context.before;
exports.suiteTeardown = context.suiteTeardown || context.after;
Expand Down