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

Error with projects #6869

Closed
budarin opened this issue Aug 20, 2018 · 2 comments
Closed

Error with projects #6869

budarin opened this issue Aug 20, 2018 · 2 comments

Comments

@budarin
Copy link

budarin commented Aug 20, 2018

🐛 Bug Report

I have 2 projects and each of them works well when run separatelly.
But I need them run in parallel so I put them into projects key in my jest config.
Since that test process does not work properly

To Reproduce

run test separatelly:

  • npx jest ./jest.unit-test.config.js
  • npx jest ./jest.puppeteer.config.js

enshure that they work well

$ npx jest --config ./jest.unit-test.config.js
 PASS   unit-tests  src/common/App.test.js
  Home Page test
    √ renders correctly (45ms)

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   1 passed, 1 total
Time:        4.8s
Ran all test suites.
$ npx jest --config ./jest.puppeteer.config.js
 PASS   puppeteer-tests  src/common/App.test.pptr.js (7.717s)
  Home Page
    √ should load without error (12ms)
    √ should display mouse position (28ms)
    √ should use fake timers (80ms)

Test Suites: 1 passed, 1 total
Tests:       3 passed, 3 total
Snapshots:   0 total
Time:        7.927s
Ran all test suites.

main test config is:

module.exports = {
    projects: ['./jest.unit-test.config.js', './jest.puppeteer.config.js'],
};

run main test with the projects

  • npx jest
 FAIL   puppeteer-tests  src/common/App.test.pptr.js
  ● Test suite failed to run

    connect ECONNREFUSED 127.0.0.1:56872

 PASS   unit-tests  src/common/App.test.js

Test Suites: 1 failed, 1 passed, 2 total
Tests:       1 passed, 1 total
Snapshots:   1 passed, 1 total
Time:        5.81s
Ran all test suites in 2 projects.

further worse

  • try to remove one of the projects from the projects array - no one work at all

Expected behavior

I need to run these projects in parallel

Link to repl or repo (highly encouraged)

Here is the repo

Run npx envinfo --preset jest

  System:
    OS: Windows 7
    CPU: x64 AMD FX(tm)-6300 Six-Core Processor
  Binaries:
    Yarn: 1.6.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.3.0 - C:\Program Files\nodejs\npm.CMD
@SimenB
Copy link
Member

SimenB commented Aug 22, 2018

The issue here is that the projects use globalConfig which is not hoisted out of Project config.

So in essence, this is a duplicate of #6292. Help solving this would be greatly appreciated! 🙂

@SimenB SimenB closed this as completed Aug 22, 2018
@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 12, 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

2 participants