-
-
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
Setting message (reason) for test skip #2572
Comments
This thread explains the solution for same problem using Jasmine. Im looking for something similar in Mocha. |
I too would love to have something like that. I could not find any inputs about how to enter reason for skipping in documentation here May be a candidate for a feature request? It could just be a case that the documentation is missing while feature is there. |
fyi: a workaround to achieve this is available in above thread. |
this would be a good usability improvement, but see @ponmudivn's workaround |
One approach that could cover all use cases and would only be a small api change would be to allow an optional |
Agreed with @jeffvandyke I would love to have this feature |
How about doing: it.skip("A test").reason("Code has changed"); But that doesn't allow for using the |
duplicate of #2026 |
One more workaround it('My cool test', async function() {
if (this.response.status !== 201) {
this._runnable.title += ' - Skipped with reason: wrong response code'
this.skip()
}
expect(this.response.data).to.have.property('mycoolproperty')
}) |
Is it possible to set a message (mentioning reason) why a particular test is skipped, so that it could be used in reporters.
Here 'test1' will be skipped as 'checkToSkip' returns 'xit' (or it.skip). Is it possible to pass a message to reporter mentioning the reason for the test skip? something like below (or any other possible way).
checkToSkip(4)("test2", function() { \\ test goes here}, "My Skip message!!!!" );
or
checkToSkip(4)("test2", function() { \\ test goes here}).pending("My Skip message!!!!");
Note: Im using mocha in webdriverIO.
Thanks.
The text was updated successfully, but these errors were encountered: