Error running tests from editor with jest 24.*

My tests are written in typescript. I use ts-jest to run the tests by clicking the green arrow in the left gutter. It has been working fine up util 23.6. But upgrading to 24.* breaks the tests. It throws errors like this:

Test suite failed to run

TypeError: Class constructor Spec cannot be invoked without 'new'

85 | function createdPatchedSpec(OriginalSpec, registry) {
86 | function PatchedSpec(attrs) {
> 87 | OriginalSpec.apply(this, arguments);
| ^
88 | if (attrs && {
89 | registry[] = this;
90 | }

But when I run the test via `npm run test`, the tests are working fine. 

Here is a reproduced example:




5 was fixed yesterday.

as a workaround, please try disabling jest.test.tree.use.jasmine.reporter registry key:

  • "Help | Find Action..." on the main menu;
  • Type "registry" and click "Registry..." found element;
  • Find jest.test.tree.use.jasmine.reporter key and disable it.

In version 2018.3.5 it hasn't been fixed yet. Had to use the work around


>In version 2018.3.5 it hasn't been fixed yet

No surprise - 2018.3.5 was released on February 27, 2019, and was fixed on March, 11. We haven't yet invented a time machine, sorry


Somehow thats the latest version that I can download. I dont know why. So the fixed version is 2019.1?


Yes, exactly. Fix will be included in the next 2019.1 EAP (


Thanks Elena for the workaround! Just ran into this myself. :) 


Awesome!  Workaround works!


Thanks for the Workaround Elena. Will it be included in the next 2018.* release? I really miss seeing the difference in my snapshot tests, and I don't want to jump into an EAP for work.


Yes, we plan to release 2018.3.6 update that will include the fix


many thanks Elena.


Elena thank you, workaround is working for me :)