question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for test.fail

See original GitHub issue

What 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:open
  • Created a year ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
romankhomitskyicommented, Sep 9, 2022

Just add .skip and TODO comment and link jira issue 📈

0reactions
alirezamiriancommented, Sep 9, 2022

Thanks for you suggestions @lmiller1990. I agree it makes more sense to be a feature in Mocha.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found