Skip to content

Commit 6eab812

Browse files
authored
test(wtr): refine exception cases to match updated behavior (#5694)
* test(wtr): refine exception cases to match updated behavior * chore: update comment
1 parent b0426b6 commit 6eab812

File tree

1 file changed

+5
-5
lines changed
  • packages/@lwc/integration-wtr/test/rendering/sanitize-stylesheet-token

1 file changed

+5
-5
lines changed

packages/@lwc/integration-wtr/test/rendering/sanitize-stylesheet-token/index.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ props.forEach((prop) => {
8282
if (
8383
process.env.NATIVE_SHADOW &&
8484
process.env.DISABLE_STATIC_CONTENT_OPTIMIZATION &&
85-
Ctor !== Scoping
85+
Ctor === Component &&
86+
prop === 'legacyStylesheetToken'
8687
) {
87-
// If we're rendering in native shadow and the static content optimization is disabled,
88-
// then there's no problem with invalid stylesheet tokens because they are only rendered
89-
// as class attribute values using either `classList` or `setAttribute` (and this only applies
90-
// when `*.scoped.css` is being used).
88+
// When using legacy stylesheet tokens with unscoped CSS in native shadow with static content
89+
// optimization disabled, there's no problem with invalid stylesheet tokens because they are
90+
// only rendered as class attribute values using either `classList` or `setAttribute`
9191
expect(elm.shadowRoot.children.length).toBe(1);
9292
} else {
9393
expect(elm.shadowRoot.children.length).toBe(0); // does not render

0 commit comments

Comments
 (0)