Support for test.fail
See original GitHub issueWhat would you like?
A way to specify a test must fail. That, vs .skip
would be similar to @ts-expect-error vs @ts-ignore.
It can be similar to Playwright, which supports a test.fail() function to be called in test. It can also be test.fail
or test.failing
, similar to how jest supports it.
Why is this needed?
If .skip
is used to exclude a test that is meant to capture a bug that is supposed to be fixed at some point, it’s easy to forget about removing .skip
annotation when the bug is fixed.
Other
Not sure if it should be a feature request here or on Mocha.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
3 Ways to Offer Encouragement to Someone Who Has Failed ...
Ask them to tell you how they feel, and let them talk as long as they need to. You can say something like...
Read more >What To Do When Tests Fail? - TestProject
Test failures - how they impact our app quality, how to prevent them, what best practices exists to detect them ealy and fix...
Read more >What to Do If You've Failed a Test | BestColleges
Failing a test is part of college. Use these five tips to get past the frustration of failing an exam and to perform...
Read more >Test Failure Analysis Best Practices - Sauce Labs
In this post, we take a look at what test failure analysis means and discuss strategies for getting the most out of it....
Read more >Test Automation Best Practice #6: Resolve Failing Test Cases
Taking the time to resolve your failed test cases, and to learn from the failures, will help make your entire test suite more...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just add .skip and TODO comment and link jira issue 📈
Thanks for you suggestions @lmiller1990. I agree it makes more sense to be a feature in Mocha.