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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: testEnvironment per file type #15004

Open
SpadarShut opened this issue Apr 3, 2024 · 1 comment
Open

[Feature]: testEnvironment per file type #15004

SpadarShut opened this issue Apr 3, 2024 · 1 comment

Comments

@SpadarShut
Copy link

馃殌 Feature Proposal

Add a way to automatically pick an environment per file.
I would suggest that testEnvironment config option could be a function which receives some info about the file and would return thetestEnvironment.

Motivation

I'd like to run .ts files in node env and .tsx in jsdom to avoid the overhead of initializing jsdom where it's not needed.

Example

No response

Pitch

The core supports a comment in test file to set the env. It would be useful to be able to automate it.

Copy link

github-actions bot commented May 3, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant