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

Jest multi-project-runner still cannot handle exactly one project #8860

Closed
kenrick95 opened this issue Aug 21, 2019 · 2 comments
Closed

Jest multi-project-runner still cannot handle exactly one project #8860

kenrick95 opened this issue Aug 21, 2019 · 2 comments

Comments

@kenrick95
Copy link
Contributor

kenrick95 commented Aug 21, 2019

🐛 Bug Report

I saw #4117 and #7496, which said that it should be fixed in #7498 (released in Jest 24.8.0), but apparently not in my use case where projects is set in root's jest.config.js.

To Reproduce

Steps to reproduce the behavior:

See this repository


At the root's jest.config.js:

Specifying projects as only ['packages/p1'] makes "jest-config" fails to read packages/p1/jest.config.js

> yarn test --showConfig
{
  "configs": [
    {
      ..
      "name": "c8776339e2f916fd188945055cabc504",
      ..
     }
  ],
  "globalConfig": {
    ..
    "projects": [
      "packages/p1"
    ],
  }
}

But if I specify projects as ['packages/p1', 'packages/p2'], both configs are successfully read

> yarn test --showConfig
{
  "configs": [
    {
      ..
      "name": "p1",
      ..
     },
    {
      ..
      "name": "p2",
      ..
     }
  ],
  "globalConfig": {
    ..
    "projects": [
      "packages/p1",
      "packages/p2"
    ],
  }
}

Expected behavior

"jest-config" correctly read the configs when there is only one project specified in root's jest.config.js

Link to repl or repo (highly encouraged)

https://github.com/kenrick95/jest-multi-project-runner-config-repro

envinfo

  System:
    OS: macOS 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
  Binaries:
    Node: 12.5.0 - /usr/local/bin/node
    Yarn: 1.16.0 - /usr/local/bin/yarn
    npm: 6.9.0 - /usr/local/bin/npm
  npmPackages:
    jest: ^24.9.0 => 24.9.0
@SimenB
Copy link
Member

SimenB commented Nov 22, 2019

#8894

@SimenB SimenB closed this as completed Nov 22, 2019
@kenrick95 kenrick95 changed the title Jest mutli-project-runner still cannot handle exactly one project Jest multi-project-runner still cannot handle exactly one project Nov 23, 2019
@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 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants