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

[Bug]: ts-jest[ts-jest-transformer] (WARN) Define ts-jest config under globals is deprecated. with ts-jest 29.0.5 #2037

Closed
msiemczyk opened this issue Mar 28, 2023 · 6 comments

Comments

@msiemczyk
Copy link

Version

13.0.1

Steps to reproduce

There is no globals section in my jest.config.js; ie

globals: {
'ts-jest': {
tsconfig: '/tsconfig.spec.json',
},
},

  1. Setup Angular project with Jest 29.5.0 and jest-preset-angular 13.0.1
  2. Run ng test or however you execute jest

Expected behavior

Not to see any warnings.

Actual behavior

Warning about use of ts-jest in globals:

ts-jest[ts-jest-transformer] (WARN) Define ts-jest config under globals is deprecated. Please do
transform: {
<transform_regex>: ['ts-jest', { /* ts-jest config goes here in Jest */ }],
},

image

Additional context

I had originally seen that warning when I actually had ts-jest in globals config, but I realized I didn't actually need it because I'm using default tsconfig.spec.json file. I don't think it's my configuration, but maybe I'm wrong.

Environment

System:
    OS: Windows 10 10.0.19044
    CPU: (12) x64 Intel(R) Xeon(R) W-2135 CPU @ 3.70GHz
  Binaries:
    Node: 16.17.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 8.15.0 - C:\Program Files\nodejs\npm.CMD
  npmPackages:
    jest: ^29.5.0 => 29.5.0
@msiemczyk
Copy link
Author

Ah, I just realized that you have a ticket for it already and it was merged. I guess we just need to release new version now.

#1937

@msiemczyk msiemczyk closed this as not planned Won't fix, can't repro, duplicate, stale Mar 28, 2023
@maks-humeniuk
Copy link

@msiemczyk, did upgrading to v13.1.1 help? I still see this issue there, which is weird, since #1937 has been merged.

@msiemczyk
Copy link
Author

@msiemczyk, did upgrading to v13.1.1 help? I still see this issue there, which is weird, since #1937 has been merged.

Hi,

Our software is still using older Angular 15 so we stayed on Jest 28 and I'm not sure if that problem was fixed now.

@maks-humeniuk
Copy link

Still an issue in Angular 15 and Jest 28/29.

@maks-humeniuk
Copy link

Same for Angular 17, jest@29.7.0 and jest-preset-angular@14.0.4.

@ahnpnl
Copy link
Collaborator

ahnpnl commented May 11, 2024

@maks-humeniuk pls check https://github.com/thymikee/jest-preset-angular/tree/main/examples

If you follow the example config there, the warning should be gone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants