0

I'm trying to write tests for my LWC components. There also "Light DOM" components present but it seems like there is no support for it:

This is the error I'm getting:

Error: Assert Violation: XXXX is an invalid LWC component. Light DOM components are not available in this environment.

Is there any way around this or is it simply not supported?

2

1 Answer 1

0

Based on https://github.com/salesforce/lwc/releases/tag/v2.4.0 ,it requires LWC >= 2.4.0

For finding the current version of LWC, in your yarn.lock file (or equivalent) you should see something like this:

[email protected]:
  version "2.2.9"
  resolved "https://registry.yarnpkg.com/lwc/-/lwc-
  dependencies:
    "@lwc/compiler" "2.2.9"
    "@lwc/engine-dom" "2.2.9"
    "@lwc/engine-server" "2.2.9"
    "@lwc/features" "2.2.9"
    "@lwc/synthetic-shadow" "2.2.9"
    "@lwc/wire-service" "2.2.9"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .