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

feat: add allowOnly option #669

Merged
merged 9 commits into from Feb 3, 2022

Conversation

DerYeger
Copy link
Member

@DerYeger DerYeger commented Feb 2, 2022

Closes #668.

This PR adds a new option allowOnly. If this option is false, suites and tests marked as only will fail.
By default, the option is disabled if process.env.CI is true and enabled otherwise.

@netlify
Copy link

netlify bot commented Feb 2, 2022

✔️ Deploy Preview for vitest-dev ready!

🔨 Explore the source changes: 674c035

🔍 Inspect the deploy log: https://app.netlify.com/sites/vitest-dev/deploys/61fb3b8116e4dc0007dd4f54

😎 Browse the preview: https://deploy-preview-669--vitest-dev.netlify.app

@DerYeger DerYeger added the enhancement New feature or request label Feb 2, 2022
@Demivan
Copy link
Member

Demivan commented Feb 2, 2022

Do we need an option for this? I would just enable this by default when env is CI

Edit: maybe a flag to disable this should be added. Like with --passWithNoTests - --allowOnly for example.

@DerYeger
Copy link
Member Author

DerYeger commented Feb 2, 2022

Do we need an option for this? I would just enable this by default when env is CI

Edit: maybe a flag to disable this should be added. Like with --passWithNoTests - --allowOnly for example.

Sounds like a better approach. I'll update the PR.

@DerYeger DerYeger marked this pull request as draft February 2, 2022 15:10
@DerYeger DerYeger changed the title feat: add option to fail on only feat: add allowOnly option Feb 2, 2022
@DerYeger DerYeger requested a review from Demivan February 2, 2022 16:12
@DerYeger DerYeger self-assigned this Feb 2, 2022
@DerYeger DerYeger marked this pull request as ready for review February 2, 2022 16:13
@antfu antfu enabled auto-merge (squash) February 3, 2022 02:19
@antfu antfu disabled auto-merge February 3, 2022 02:26
@antfu antfu merged commit cc73207 into vitest-dev:main Feb 3, 2022
chaii3 pushed a commit to chaii3/vitest that referenced this pull request May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: add option to fail on only
3 participants