-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Run a test only if meets a condition #11020
Comments
I believe duplicated with #7245 |
@ahnpnl I think it isn't, that's about skipping a test if a condition is true, but here I suggest running a test if meets a condition without using |
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🚀 Feature Proposal
Currently, if we want to run a test based on a condition we do it classically, we use if statement inside the body of the
test/it
function. This proposal suggests that we can add new functionality such as theonly/skip
ones, thus run the test if meets a condition:test.onlyIf(condition = true, 'Run it only if true')
Example
This proposal suggests that:
Actually, it will be useful when we try to check if a file exists to run tests against it.
The text was updated successfully, but these errors were encountered: