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

Running --runInBand or --maxWorkers=1 and --no-cache invokes TypeError: Cannot read property 'some' of undefined in @babel/helper-module-transforms/lib/index.js #7762

Closed
ethernal opened this issue Jan 30, 2019 · 3 comments
Labels

Comments

@ethernal
Copy link

ethernal commented Jan 30, 2019

Title is long but should make finding issue for others easier.

🐛 Bug Report

Running Jest --runInBand or --maxWorkers=1 and --no-cache invokes TypeError: Cannot read property 'some' of undefined in @babel/helper-module-transforms/lib/index.js

Removing either of them solves the issue.
Running yarn or npx jest --no-cache --maxWorkers=2 NO issue.
Running yarn or npx jest --runInBand NO issue .
Running yarn or npx jest --no-cache NO issue .

Running yarn or npx jest --runInBand --no-cache invokes the ERROR.

Important notice: I work on Windows 10 (1803) and I have seen a lot of issues with file races etc. Not sure if this is related to #4444 or other tickets.

To Reproduce

Clone the latest commit from
https://github.com/ethernal/react-boilerplate

Steps to reproduce the behavior:

in terminal run:
yarn install and then

yarn / npx jest --no-cache --runInBand

or yarn / npx jest --no-cache --maxWorkers=1

Expected behavior

All existing tests should pass with yarn jest --no-cache --runInBand .

Link to repl or repo (highly encouraged)

https://github.com/ethernal/react-boilerplate

Issues without a reproduction link are likely to stall.

Run npx envinfo --preset jest

Paste the results here:

System:
    OS: Windows 10
    CPU: (4) x64 Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
  Binaries:
    Node: 10.14.1 - D:\software\nodejs\node.EXE
    Yarn: 1.13.0 - D:\software\yarn\bin\yarn.CMD
    npm: 6.4.1 - D:\software\nodejs\npm.CMD
@SimenB
Copy link
Member

SimenB commented Jan 31, 2019

This is fixed by upgrading to Jest 24. You'll get an error about moduleFileExtensions, but that's fixed in master by #7751. Hopefully will get a release today 🙂

$ npx jest --runInBand --no-cache --config test/jest.test.js
● Deprecation Warning:

  Option "setupTestFrameworkScriptFile" was replaced by configuration "setupFilesAfterEnv", which supports multiple paths.

  Please update your configuration.

  Configuration Documentation:
  https://jestjs.io/docs/configuration.html

 PASS   test  src/__tests__/example.test.ts
  ✓ AddFunction (4ms)
  AddFunction
    ✓ adding positive integers
    ✓ adding negative integers (1ms)
    ✓ adding positive and negative integers
    ✓ adding positive floats
    ✓ adding negative floats (1ms)
    ✓ adding positive and negative floats

 PASS   test  src/__tests__/app.test.tsx
  ✓ renders (23ms)

----------|----------|----------|----------|----------|-------------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files |        0 |        0 |        0 |        0 |                   |
----------|----------|----------|----------|----------|-------------------|
Jest: Coverage data for ./src/index.tsx was not found.
Test Suites: 2 passed, 2 total
Tests:       8 passed, 8 total
Snapshots:   0 total
Time:        4.556s
Ran all test suites.

@SimenB SimenB closed this as completed Jan 31, 2019
@ethernal
Copy link
Author

Thanks for that.

@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
Projects
None yet
Development

No branches or pull requests

2 participants