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

Jest 27.0.0-next.5 support #2459

Closed
ai opened this issue Mar 17, 2021 · 2 comments 路 Fixed by #2450
Closed

Jest 27.0.0-next.5 support #2459

ai opened this issue Mar 17, 2021 · 2 comments 路 Fixed by #2450
Labels
馃悰 Bug Confirmed Bug is confirmed

Comments

@ai
Copy link

ai commented Mar 17, 2021

馃悰 Bug Report

Using ts-jest 27.0.0-next.8 with jest 27.0.0-next.5 leads to error:

TypeError: Jest: a transform must export something.
    at /home/ai/Dev/akeero-front/node_modules/@jest/transform/build/ScriptTransformer.js:414:19
    at Array.map (<anonymous>)
    at ScriptTransformer.loadTransformers (/home/ai/Dev/akeero-front/node_modules/@jest/transform/build/ScriptTransformer.js:387:30)
    at createScriptTransformer (/home/ai/Dev/akeero-front/node_modules/@jest/transform/build/ScriptTransformer.js:1121:21)
    at /home/ai/Dev/akeero-front/node_modules/@jest/core/build/TestScheduler.js:273:78
    at Array.map (<anonymous>)
    at TestScheduler.scheduleTests (/home/ai/Dev/akeero-front/node_modules/@jest/core/build/TestScheduler.js:267:28)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async runJest (/home/ai/Dev/akeero-front/node_modules/@jest/core/build/runJest.js:377:19)
    at async _run10000 (/home/ai/Dev/akeero-front/node_modules/@jest/core/build/cli/index.js:406:7)

To Reproduce

Steps to reproduce the behavior:

// jest.config.json
{
  "preset": "ts-jest/presets/default-esm",
  "globals": {
    "ts-jest": {
      "useESM": true
    }
  },
  "testEnvironment": "node"
}
yarn add jest@next
yarn add ts-jest@next
echo "it.todo('test')" > index.test.ts
NODE_OPTIONS=--experimental-vm-modules npx jest

Debug log:

# content of ts-jest.log :
{"context":{"allowJs":false,"logLevel":20,"namespace":"jest-preset","package":"ts-jest","version":"27.0.0-next.8"},"message":"creating jest presets not handling JavaScript files","sequence":1,"time":"2021-03-17T00:37:15.657Z"}
{"context":{"allowJs":false,"logLevel":20,"namespace":"jest-preset","package":"ts-jest","version":"27.0.0-next.8"},"message":"creating jest presets not handling JavaScript files","sequence":2,"time":"2021-03-17T00:37:15.662Z"}
{"context":{"logLevel":20,"namespace":"Importer","package":"ts-jest","version":"27.0.0-next.8"},"message":"creating Importer singleton","sequence":3,"time":"2021-03-17T00:37:15.933Z"}

envinfo

System:
    OS: Linux
    Node version: 15.11.0

Npm packages:
    jest: 27.0.0-next.5
    ts-jest: 27.0.0-next.8
@ai ai added Bug Report Needs Repo Need a minimium repository to reproduce the problem Needs Triage labels Mar 17, 2021
@ahnpnl ahnpnl added 馃悰 Bug Confirmed Bug is confirmed and removed Bug Report Needs Repo Need a minimium repository to reproduce the problem Needs Triage labels Mar 17, 2021
ahnpnl added a commit that referenced this issue Mar 17, 2021
@ai
Copy link
Author

ai commented Mar 18, 2021

Can you release the fix, please?

@ahnpnl
Copy link
Collaborator

ahnpnl commented Mar 19, 2021

27.0.0-next.9 was out.

C0ZEN added a commit to Sonia-corporation/sonia-discord that referenced this issue May 25, 2021
came across this issue kulshekhar/ts-jest#2459 and I will wait for the stable release of ts-jest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
馃悰 Bug Confirmed Bug is confirmed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants