[Bug]: Exported enums not working on tests
See original GitHub issueVersion
27.1.4
Steps to reproduce
- Clone the repo at https://github.com/ibesora/ts-jest-enum
- Run
npm install
- Run
npm run test
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:
- Created a year ago
- Reactions:3
- Comments:12
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please fix this, it’s affecting our core testing functionality
We just noticed this while working on Jest 28 support, will try to fix this issue.