Is it possible to test the methods in a class that extends
LightningElement (e.g. an LWC component) in isolation?
In other words, I think it would be more time effective to simply create an instance of the component class using
It's not that I don't see the value in DOM-level tests, but a lot of logic in LWC components is not DOM related, and it is cumbersome to test it by way of the DOM.
Is it a matter of putting any non-DOM logic in a class that is then imported into the component?