-
-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Jest] Cannot read property 'createMask' of undefined #225
Comments
|
I think a problem with |
maybe around here https://github.com/uNmAnNeR/imaskjs/blob/master/packages/imask/rollup.config.js#L32 @uNmAnNeR what do you think? |
Also works like |
I think adding |
@listepo-alterpost can you please check #226 |
still failed, |
I think |
Actually it is already done for |
but the problem remains |
Could you please check if |
still failed |
No more ideas so far. If 'require' is working than probably issue relates to building jest tests. I have not used it so can not reason about. |
I will try to find a solution |
@listepo-alterpost hi! may be it will help #235 |
should be fixed now |
@uNmAnNeR thanks |
For me this still seems to fail as i import it like that import IMask from 'imask' and use it: Then JEST screams at me: TypeError: Cannot read property 'Masked' of undefined |
@tarmooo try |
thank you for your reply @uNmAnNeR, but still same, also tried other import methods that are referenced in this issue
I use imask inside stenciljs if that matters at all. |
Ok, seems that problem is not in import. So it seems that your globals has been changed from moment where scripts are imported and when tests are executing. So check if it's possible to keep globals. |
Yes, that actually fixed it. At least my snapshot tests are running now. Good job :) Waiting for release because it is not possible to install pacakge from subdirectory sadly. |
Cannot read property 'createMask' of undefined
forjest
, when importimport IMask from 'imask';
The text was updated successfully, but these errors were encountered: