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 --shard command #1477

Merged
merged 4 commits into from Jun 14, 2022
Merged

Conversation

sheremet-va
Copy link
Member

Closes #1464

@netlify
Copy link

netlify bot commented Jun 13, 2022

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 631b5a9
🔍 Latest deploy log https://app.netlify.com/sites/vitest-dev/deploys/62a8adcb9e3c6c0009a61254
😎 Deploy Preview https://deploy-preview-1477--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@sheremet-va sheremet-va requested a review from antfu June 13, 2022 18:22
),
)

process.exit(1)
Copy link
Member

@antfu antfu Jun 14, 2022

Choose a reason for hiding this comment

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

Better to just throw the error, as resolveConfig can be used programmatically, and the caller might want to catch the error.

Copy link
Member Author

Choose a reason for hiding this comment

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

We have a bug, when throwing an error, process doesn't stop 👀

Copy link
Member

Choose a reason for hiding this comment

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

We can catch it and process.exit in the caller, instead of having side-effect for resolveConfig

Copy link
Member Author

Choose a reason for hiding this comment

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

I've added throwing, but I still do process.exit when catching the error

Copy link
Member

@antfu antfu left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM

@sheremet-va sheremet-va merged commit 805c0ba into vitest-dev:main Jun 14, 2022
@sheremet-va sheremet-va deleted the feat/shard branch June 14, 2022 17:58
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.

Shard option to distribute tests across multiple machines
2 participants