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

Run individual tests in jsdom or node during the same test run #2849

Closed
SimenB opened this issue Feb 9, 2017 · 3 comments
Closed

Run individual tests in jsdom or node during the same test run #2849

SimenB opened this issue Feb 9, 2017 · 3 comments

Comments

@SimenB
Copy link
Member

SimenB commented Feb 9, 2017

Do you want to request a feature or report a bug?
Feature

What is the current behavior?
One has to choose if tests should be run in Node or jsdom (or something else), it is not possible to have some tests run one environment, and some other in another environment

If the current behavior is a bug, please provide the steps to reproduce and either a repl.it demo through https://repl.it/languages/jest or a minimal repository on GitHub that we can yarn install and yarn test.
N/A

What is the expected behavior?
To be able to choose, on a file-by-file basis, if the tests should be run in jsdom or node, and have all tests ran within the same command.
Current workaround is to have two separate scripts in package.json, resulting in two separate test runs.

I mentioned this on reactiflux, and was told something like this was wanted:

/**
 * @environment jsdom
 */

So this is at least a tracking issue for it! 😄 I would like to work on this, but I don't know how much work it would entail, or where to begin. I'll have a look this weekend.

Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
Jest v18.1.0, yarn 0.20.0 macOS Sierra

@mathieumg
Copy link
Contributor

#2587

@cpojer
Copy link
Member

cpojer commented Feb 9, 2017

closing as duplicate.

@cpojer cpojer closed this as completed Feb 9, 2017
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants