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

fail when no tests were run and --fail-on-empty was set #1410

Merged
merged 1 commit into from
May 21, 2024

Conversation

grosser
Copy link
Contributor

@grosser grosser commented May 9, 2024

fixes #1394

cc @onsi

SCR-20240509-dly
SCR-20240509-do2

@@ -489,10 +489,15 @@ func (suite *Suite) runSpecs(description string, suiteLabels Labels, suitePath s
newGroup(suite).run(specs.AtIndices(groupedSpecIndices[groupedSpecIdx]))
}

if specs.HasAnySpecsMarkedPending() && suite.config.FailOnPending {
if suite.config.FailOnPending && specs.HasAnySpecsMarkedPending() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also changed this to be consistent and since checking the boolean first is more efficient + avoids possible errors in the HasAnySpecsMarkedPending method

Copy link
Collaborator

@blgm blgm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've wanted this feature too. Thank you for implementing it!

docs/index.md Outdated Show resolved Hide resolved
@onsi
Copy link
Owner

onsi commented May 21, 2024

looks great, thanks @grosser !

@onsi onsi merged commit d80eebe into onsi:master May 21, 2024
6 checks passed
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.

Add cli flag to fail when no tests were run
3 participants