ts-jest: [Bug]: Exported enums not working on tests

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

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 12
  • Comments: 16

Most upvoted 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.

Hi guys, this is still problem…any news when it will be fixed?

"jest": "29.7.0", "ts-jest": "29.1.2",

@ibesora @kudryashov13 In case you didn’t see, a way to tackle the issue while it’s being fixed has been found here https://github.com/kulshekhar/ts-jest/issues/281#issuecomment-500780488