In StencilJs I imported Shoelace library in my component like this:
import module from '@shoelace-style/shoelace/dist/components/card/card';
if (!customElements.get('sl-card')) customElements.define('sl-card', module);
and in test I get this error:
SyntaxError: Cannot use import statement outside a module.
Do you have any idea why Shoelace components cause this error in jest?
You need to enable ESM. Jest has experimental support but you need to opt in to it: