mercredi 16 août 2017

JestJS can't instantiate new EventEmmiter in spec files

Whenever I try to test a component which is using eventemitter2 and tries to make a new instance of it so for example import EventEmitter from 'eventemitter2' and then new EventEmitter() in my spec files, it throws an error TypeError: _eventemitter2.default is not a constructor. Any ideas what could cause this issue? Thank you.

Aucun commentaire:

Enregistrer un commentaire