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

introduce VITEST_WORKER_ID or similar env var #667

Closed
4 tasks done
capaj opened this issue Feb 2, 2022 · 2 comments · Fixed by #774
Closed
4 tasks done

introduce VITEST_WORKER_ID or similar env var #667

capaj opened this issue Feb 2, 2022 · 2 comments · Fixed by #774
Labels
enhancement New feature or request

Comments

@capaj
Copy link

capaj commented Feb 2, 2022

Clear and concise description of the problem

jest has JEST_WORKER_ID, which is useful for example when running X parallel tests, each test can connect to a different DB.

Suggested solution

it would be nice to be able to use VITEST_WORKER_ID env var to identify workers.
Ideally this would be a positive integer rather then a UUID

Alternative

the worker ID could also be available as an export that clients could import for example like:

import { workerId } from 'vitest'

Additional context

No response

Validations

@sheremet-va sheremet-va added the enhancement New feature or request label Feb 17, 2022
@capaj
Copy link
Author

capaj commented Feb 17, 2022

this will be released in 0.3.7 right?

@sheremet-va
Copy link
Member

this will be released in 0.3.7 right?

Yes

@github-actions github-actions bot locked and limited conversation to collaborators Jun 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants