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

TypeError using interface ui: 'exports' #3576

Closed
wants to merge 1 commit into from

Conversation

juergba
Copy link
Member

@juergba juergba commented Nov 23, 2018

Description of the Change

Cannot run ui: 'exports' tests using API. The call to mocha.run() throws an exception "TypeError: Cannot read property 'skip' of undefined".

/home/rpaterson/programming/signpost/toshokan/node_modules/mocha/lib/mocha.js:207
    exports.xit = context.xit || context.test.skip;
                                             ^

TypeError: Cannot read property 'skip' of undefined

The ui: 'exports' interface is implemented in a basic manner. Only suites, tests and before-/beforeAll- and after-/afterAll-hooks are supported. Neither it.skip nor it.only are accepted.

This bug was introduced by PR #2997.
The correction is very simple:

exports.xit = context.xit || (context.test && context.test.skip);

Benefits

Bug fixing

Applicable issues

issue #3004

@coveralls
Copy link

Coverage Status

Coverage increased (+0.09%) to 90.663% when pulling ca6492e on juergba:issue/3004 into d60b333 on mochajs:master.

@juergba
Copy link
Member Author

juergba commented Dec 11, 2018

@boneskull please close, since solved in b5c0fb0

@juergba juergba closed this Dec 11, 2018
@juergba juergba deleted the issue/3004 branch December 11, 2018 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants