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

ts-transformer-keys not working since 26.4.2 (works in 26.4.1) #2073

Closed
DamianPereira opened this issue Oct 26, 2020 · 2 comments 路 Fixed by #2062
Closed

ts-transformer-keys not working since 26.4.2 (works in 26.4.1) #2073

DamianPereira opened this issue Oct 26, 2020 · 2 comments 路 Fixed by #2062

Comments

@DamianPereira
Copy link

DamianPereira commented Oct 26, 2020

馃悰 Bug Report

ts-transformer-keys shows the following error when running any test that uses it:

    ReferenceError: ts_transformer_keys_1 is not defined

       6 | export default class TestClass {
       7 |   testMethod(){
    >  8 |     keys();
         |     ^
       9 |     const fooKeys = keys<Foo>();
      10 |     return fooKeys
      11 |   }

To Reproduce

Steps to reproduce the behavior:

  1. Clone ts-transformer-keys repository: https://github.com/kimamula/ts-transformer-keys/
  2. go to examples/ts-jest
  3. Switch from version 26.3.0 to 26.4.2 (versions up to 26.4.1 work correctly, 26.4.2 is the first failing one)
  4. Optionally update syntax in jest.config.js to an object with before key instead of straight array to solve deprecation warning (has no effect on error above)
  5. Run npm install
  6. Run npm start

Expected behavior

Tests should pass and keys function from keys transformer should be made available to the code.

Debug log:

# content of ts-jest.log (file are too big, saved to 2 gists):
26.4.2 (failing): https://gist.github.com/DamianPereira/194e33d29411e36c1c221da44d07b38d
26.4.1 (working): https://gist.github.com/DamianPereira/eab246c2daef2c337fdc90859e8bf551

envinfo

System:
    OS: Manjaro linux
    Node version: 14.3.0

Npm packages:
    jest: 26.4.2
    ts-jest: 26.4.2
    typescript: 4.0.2
@DamianPereira DamianPereira added Bug Report Needs Repo Need a minimium repository to reproduce the problem Needs Triage labels Oct 26, 2020
@ahnpnl
Copy link
Collaborator

ahnpnl commented Oct 26, 2020

fixed in #2062 . Please wait for 26.4.3 :)

@ahnpnl ahnpnl closed this as completed Oct 26, 2020
@ahnpnl ahnpnl added Regression 馃挜 and removed Bug Report Needs Repo Need a minimium repository to reproduce the problem Needs Triage labels Oct 26, 2020
@DamianPereira
Copy link
Author

That was quick! No problem, thanks a lot!

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

Successfully merging a pull request may close this issue.

2 participants