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

[feature] Added a CLI flag to allow passing without any test files found #2758

Conversation

glektarssza
Copy link

@glektarssza glektarssza commented Jun 21, 2024

What I did

  1. Added a CLI flag that allows passing without any test files being found.
  2. Added documentation for the above new CLI flag.
  3. Added a Git ignore line for local environment files (e.g. .envrc).

Would resolve #1331

Copy link

changeset-bot bot commented Jun 21, 2024

🦋 Changeset detected

Latest commit: dcaff84

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 12 packages
Name Type
@web/test-runner-core Minor
@web/test-runner Minor
@web/test-runner-chrome Patch
@web/test-runner-commands Patch
@web/test-runner-coverage-v8 Patch
@web/test-runner-junit-reporter Patch
@web/test-runner-mocha Patch
@web/test-runner-playwright Patch
@web/test-runner-puppeteer Patch
@web/test-runner-selenium Patch
@web/test-runner-visual-regression Patch
@web/test-runner-webdriver Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Westbrook
Copy link
Member

Could you add a change set as requested above?

@glektarssza
Copy link
Author

I will add one after work today.

@glektarssza
Copy link
Author

Changeset added, @Westbrook. I think the bot's comment is completely out to lunch now, though, because of the merge commit in a957ff9.

@Westbrook
Copy link
Member

Thanks for getting the changeset it. That is looking fine. Can you check in the CI output? Once that’s green we should be good to edge this.

@glektarssza
Copy link
Author

Will take a look tonight!

}
finalConfig.files = undefined;
finalConfig.allowPassWithoutTests = undefined;
Copy link
Member

Choose a reason for hiding this comment

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

what is the reason to set it as undefined? isn't it more clear to have it always as a boolean and default to false?

@@ -27,6 +27,7 @@ export interface CoverageConfig {
export interface TestRunnerCoreConfig {
rootDir: string;
files?: string | string[];
allowPassWithoutTests?: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

related to another question: I'd just make it allowPassWithoutTests: boolean and default to "false", here and below

@glektarssza glektarssza closed this by deleting the head repository Oct 30, 2024
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.

[test-runner] Allow to pass if no tests
3 participants