NikhilVerma / jest-environment-node-debug-fixed

Fixed version of jest-environment-node-debug which works with Nodev7 and Jest 18
11 stars 4 forks source link

Suck in "TypeError: ModuleMocker is not a constructor" #4

Closed zhen6939 closed 7 years ago

zhen6939 commented 7 years ago

After install this module and run the following command:

node --inspect-brk ./node_modules/.bin/jest --runInBand --env jest-environment-node-debug js/__tests__/components/tokenPayTest.js

I got the error:

TypeError: ModuleMocker is not a constructor

      at new NodeDebugEnvironment (node_modules/jest-environment-node-debug/index.js:54:29)
      at process._tickCallback (internal/process/next_tick.js:109:7)

How can I pass with it? Thanks man

jure commented 7 years ago

Looks like this commit broke it: https://github.com/facebook/jest/commit/fc96580a1ca0402113cd39e2e1ee97182386aca7

rmurcek commented 7 years ago

This works for me running Node 7, but breaks in the same way with node 8. Does anyone have a workaround?

Command: node --inspect-brk ./node_modules/.bin/jest --runInBand --env jest-environment-node-debug

Dependencies: Node v8.0.0 Jest 20.0.4