question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: Exported enums not working on tests

See original GitHub issue

Version

27.1.4

Steps to reproduce

Expected behavior

Tests should pass

Actual behavior

Tests fail with TypeError: Cannot read property 'Above' of undefined

Debug log

See it here It was too long to add it here

Additional context

It seems to be a regression of https://github.com/kulshekhar/ts-jest/issues/281 I can update the protomaps package if needed but it doesn’t look like it’s doing anything weird Setting isolatedModules to false doesn’t change anything

Environment

System:
    OS: Linux 5.13 Ubuntu 21.10 21.10 (Impish Indri)
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i9-11980HK @ 2.60GHz
  Binaries:
    Node: 16.8.0 - ~/.asdf/installs/nodejs/16.8.0/bin/node
    Yarn: 1.22.15 - ~/.asdf/installs/nodejs/16.8.0/.npm/bin/yarn
    npm: 7.21.0 - ~/.asdf/plugins/nodejs/shims/npm
  npmPackages:
    jest: ^27.5.1 => 27.5.1

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:3
  • Comments:12

github_iconTop GitHub Comments

17reactions
mikerentmeistercommented, Jul 22, 2022

Please fix this, it’s affecting our core testing functionality

5reactions
ahnpnlcommented, Apr 23, 2022

We just noticed this while working on Jest 28 support, will try to fix this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Undefined TypeScript enum at compile time - Stack Overflow
The issue was caused by a React component that imported an enum type from a module which was also being mocked with jest....
Read more >
cpdef enums can't be shared - Google Groups
Hi, I'm trying to cimport an enum from a pxd file. If I only have one file as below, everthing works fine. test.pxd:...
Read more >
KJS: .d.ts generation not working for enum classes : KT-37916
When using @JsExport with the new .d.ts generation in 1.4-M1 only /* ErrorDeclaration: Class test.TestEnum with kind: ENUM_CLASS */ is generated. A proper ......
Read more >
Handbook - Enums - TypeScript
How TypeScript enums work. ... Enums. Enums are one of the few features TypeScript has which is not a ... printImportant ("ERROR", "This...
Read more >
Zig Language Reference
In the code sample, the error set type is not explicitly written on the left ... /_work/zig-bootstrap/zig/zig-cache/o/ea99cee9892686c425f22097d87225b1/test ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found