Mocking import of polymers
Is there a reliable way to mock imported dependencies in Polymer (or vanilla web components)?
I checked this question and other resources where they suggest defining a mocking custom element earlier.
While this approach actually mocks the definition of a custom element, it will not prevent the original copy from being imported later and its scripts are executed!
This will undoubtedly lead to conflicts, inconsistencies, and unwanted code execution when dependencies do more than just define an element.
check this as a related topic
+3
source to share
No one has answered this question yet
See similar questions:
or similar: