tech-systems / panes

🎉📱 Create dynamic modals, cards, panes for your applications in few steps. One instance – Thousands solutions. Any framework and free.
https://panejs.com
MIT License
687 stars 40 forks source link

[QUESTION] How to test with Jest? #246

Closed ArgV04 closed 1 month ago

ArgV04 commented 1 month ago

What are you trying to add to Cupertino-Pane?

Testing a component using CupertinePane with Jest and getting:

TypeError: cupertino_pane_1.CupertinoPane is not a constructor

Is there a way to mock the construction?

Describe your feature request detailed

Is there an alternative at the latest version?

[ ] Yes (descripe the alternative) [ ] No

Is this related to an issue?

[ ] Yes (Give a link to the issue) [ ] No

roman-rr commented 1 month ago

Hello @ArgV04 thank you for issue!

I created a demo with Jest tests, here is usable repository, please look up into https://github.com/tech-systems/panejs-jest-test