diff --git a/packages/@lwc/integration-karma/helpers/test-utils.js b/packages/@lwc/integration-karma/helpers/test-utils.js index f9941a68ee..c8f298b46e 100644 --- a/packages/@lwc/integration-karma/helpers/test-utils.js +++ b/packages/@lwc/integration-karma/helpers/test-utils.js @@ -577,7 +577,7 @@ window.TestUtils = (function (lwc, jasmine, beforeAll) { for (let i = 0; i < matchers.length; i++) { const matcher = matchers[i]; const args = calls[i]; - const argsString = args.map((arg) => stringifyArg(arg)).join(''); + const argsString = args.map((arg) => stringifyArg(arg)).join(' '); expect(argsString).toMatch(matcher); } } @@ -588,14 +588,12 @@ window.TestUtils = (function (lwc, jasmine, beforeAll) { function stringifyArg(arg) { if (arg instanceof Array) { return arg.map((v) => stringifyArg(v)); - } else if (arg instanceof Comment) { - return ``; - } else if (arg instanceof Text) { - return arg.data; - } else if (arg instanceof Element) { - return arg.outerHTML; - } else if (arg instanceof ShadowRoot) { - return arg.innerHTML; + } else if (arg?.nodeName) { + // Browsers render nodes differently (class order, etc). Node.nodeName is universal and sufficient for testing. + return arg.nodeName; + } else if (typeof arg === 'string') { + // Avoids adding newlines in the matchers + return arg.replaceAll('\n', ''); } else { return arg; } diff --git a/packages/@lwc/integration-karma/test-hydration/attributes/falsy-mismatch/index.spec.js b/packages/@lwc/integration-karma/test-hydration/attributes/falsy-mismatch/index.spec.js index c5f8cc360b..4856f0757f 100644 --- a/packages/@lwc/integration-karma/test-hydration/attributes/falsy-mismatch/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/attributes/falsy-mismatch/index.spec.js @@ -31,12 +31,8 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `LWC warn:Hydration attribute mismatch on:
-- rendered on server:data-foo=null -- expected on client:data-foo="undefined"`, - `LWC warn:Hydration attribute mismatch on:
-- rendered on server:data-foo=null -- expected on client:data-foo="null"`, + 'Hydration attribute mismatch on: DIV - rendered on server: data-foo=null - expected on client: data-foo="undefined"', + 'Hydration attribute mismatch on: DIV - rendered on server: data-foo=null - expected on client: data-foo="null"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/attrs-compatibility/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/attrs-compatibility/index.spec.js index 1a32921f92..f17a470ca7 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/attrs-compatibility/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/attrs-compatibility/index.spec.js @@ -21,12 +21,8 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on:

text

-- rendered on server:title="ssr-title" -- expected on client:title="client-title"`, - `Hydration attribute mismatch on:

text

-- rendered on server:data-another-diff="ssr-val" -- expected on client:data-another-diff="client-val"`, + 'Hydration attribute mismatch on: P - rendered on server: title="ssr-title" - expected on client: title="client-title"', + 'Hydration attribute mismatch on: P - rendered on server: data-another-diff="ssr-val" - expected on client: data-another-diff="client-val"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/attrs-expression/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/attrs-expression/index.spec.js index 831664ec4f..4c7c9fa8b7 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/attrs-expression/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/attrs-expression/index.spec.js @@ -20,9 +20,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on:
-- rendered on server:data-foo="server" -- expected on client:data-foo="client"`, + 'Hydration attribute mismatch on: DIV - rendered on server: data-foo="server" - expected on client: data-foo="client"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/dynamic-different/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/dynamic-different/index.spec.js index 69618eba80..59d2d887ca 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/dynamic-different/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/dynamic-different/index.spec.js @@ -21,9 +21,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on:

text

-- rendered on server:class="c1 c2 c3" -- expected on client:class="c2 c3 c4"`, + 'Hydration attribute mismatch on: P - rendered on server: class="c1 c2 c3" - expected on client: class="c2 c3 c4"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/dynamic-empty-in-ssr-null-string-in-client/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/dynamic-empty-in-ssr-null-string-in-client/index.spec.js index acb414ba6a..9e1dd70fe2 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/dynamic-empty-in-ssr-null-string-in-client/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/dynamic-empty-in-ssr-null-string-in-client/index.spec.js @@ -24,9 +24,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on:

text

-- rendered on server:class="" -- expected on client:class="null"`, + 'Hydration attribute mismatch on: P - rendered on server: class="" - expected on client: class="null"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/dynamic-null-string-in-ssr-empty-in-client/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/dynamic-null-string-in-ssr-empty-in-client/index.spec.js index 36c004d149..3108a136e1 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/dynamic-null-string-in-ssr-empty-in-client/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/dynamic-null-string-in-ssr-empty-in-client/index.spec.js @@ -24,9 +24,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on:

text

-- rendered on server:class="null" -- expected on client:class=""`, + 'Hydration attribute mismatch on: P - rendered on server: class="null" - expected on client: class=""', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/empty-string-on-client-nonempty-on-server/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/empty-string-on-client-nonempty-on-server/index.spec.js index 0e4df8101e..b1fbc22699 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/empty-string-on-client-nonempty-on-server/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/empty-string-on-client-nonempty-on-server/index.spec.js @@ -20,9 +20,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on:

text

-- rendered on server:class="yolo" -- expected on client:class=""`, + 'Hydration attribute mismatch on: P - rendered on server: class="yolo" - expected on client: class=""', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/empty-string-on-server-nonempty-on-client/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/empty-string-on-server-nonempty-on-client/index.spec.js index 54caf307b8..4f171a2ebf 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/empty-string-on-server-nonempty-on-client/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/empty-string-on-server-nonempty-on-client/index.spec.js @@ -20,9 +20,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on:

text

-- rendered on server:class="" -- expected on client:class="yolo"`, + 'Hydration attribute mismatch on: P - rendered on server: class="" - expected on client: class="yolo"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/extra-class-from-client/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/extra-class-from-client/index.spec.js index c514256e10..3e914fd418 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/extra-class-from-client/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/extra-class-from-client/index.spec.js @@ -22,9 +22,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on:

txt

-- rendered on server:class="c1 c3" -- expected on client:class="c1 c2 c3"`, + 'Hydration attribute mismatch on: P - rendered on server: class="c1 c3" - expected on client: class="c1 c2 c3"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/extra-class-from-server/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/extra-class-from-server/index.spec.js index c76474d0ee..b518484b94 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/extra-class-from-server/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/extra-class-from-server/index.spec.js @@ -22,9 +22,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on:

txt

-- rendered on server:class="c1 c2 c3" -- expected on client:class="c1 c3"`, + 'Hydration attribute mismatch on: P - rendered on server: class="c1 c2 c3" - expected on client: class="c1 c3"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/only-present-in-ssr/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/only-present-in-ssr/index.spec.js index d81e6e057d..f224898d34 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/only-present-in-ssr/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/only-present-in-ssr/index.spec.js @@ -14,9 +14,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on: -- rendered on server:class="foo" -- expected on client:class=""`, + 'Hydration attribute mismatch on: X-CHILD - rendered on server: class="foo" - expected on client: class=""', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/same-different-order/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/same-different-order/index.spec.js index 349c2ef64f..75f7114f5c 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/same-different-order/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/class-attr/same-different-order/index.spec.js @@ -28,9 +28,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on:

txt

-- rendered on server:class="c3 c2 c1" -- expected on client:class="c1 c2 c3"`, + 'Hydration attribute mismatch on: P - rendered on server: class="c3 c2 c1" - expected on client: class="c1 c2 c3"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/comment-instead-of-text/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/comment-instead-of-text/index.spec.js index 642222f127..dfc078cd9f 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/comment-instead-of-text/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/comment-instead-of-text/index.spec.js @@ -20,9 +20,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration node mismatch on: -- rendered on server:text -- expected on client:`, + 'Hydration node mismatch on: #comment - rendered on server: #text - expected on client: #comment', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/different-lwc-inner-html/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/different-lwc-inner-html/index.spec.js index 1af7f0dfd2..d902fd105d 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/different-lwc-inner-html/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/different-lwc-inner-html/index.spec.js @@ -24,9 +24,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration innerHTML mismatch on:

different-content

-- rendered on server:

test-content

-- expected on client:

different-content

`, + 'Hydration innerHTML mismatch on: DIV - rendered on server:

test-content

- expected on client:

different-content

', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/display-errors-attrs-class-style/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/display-errors-attrs-class-style/index.spec.js index e914073cf5..6b7fa9d630 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/display-errors-attrs-class-style/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/display-errors-attrs-class-style/index.spec.js @@ -26,15 +26,9 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on:

text

-- rendered on server:data-attrs="ssr-attrs" -- expected on client:data-attrs="client-attrs"`, - `Hydration attribute mismatch on:

text

-- rendered on server:class="ssr-class" -- expected on client:class="client-class"`, - `Hydration attribute mismatch on:

text

-- rendered on server:style="background-color: red;" -- expected on client:style="background-color: blue;"`, + 'Hydration attribute mismatch on: P - rendered on server: data-attrs="ssr-attrs" - expected on client: data-attrs="client-attrs"', + 'Hydration attribute mismatch on: P - rendered on server: class="ssr-class" - expected on client: class="client-class"', + 'Hydration attribute mismatch on: P - rendered on server: style="background-color: red;" - expected on client: style="background-color: blue;"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/dynamic-component/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/dynamic-component/index.spec.js index 2b854025e7..c39d2d62fe 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/dynamic-component/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/dynamic-component/index.spec.js @@ -20,9 +20,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration node mismatch on: -- rendered on server: -- expected on client:`, + 'Hydration node mismatch on: X-CLIENT - rendered on server: X-SERVER - expected on client: X-CLIENT', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/element-instead-of-textNode/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/element-instead-of-textNode/index.spec.js index d5439713e9..afab666a32 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/element-instead-of-textNode/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/element-instead-of-textNode/index.spec.js @@ -22,9 +22,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration node mismatch on:text -- rendered on server:text -- expected on client:text`, + 'Hydration node mismatch on: #text - rendered on server: SPAN - expected on client: #text', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/favors-client-side-comment/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/favors-client-side-comment/index.spec.js index e7c9e862a8..f875575bfd 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/favors-client-side-comment/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/favors-client-side-comment/index.spec.js @@ -21,9 +21,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration comment mismatch on: -- rendered on server:first -- expected on client:second`, + 'Hydration comment mismatch on: #comment - rendered on server: first - expected on client: second', ], }); }, diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/favors-client-side-text/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/favors-client-side-text/index.spec.js index 99f12689c9..e2f2269654 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/favors-client-side-text/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/favors-client-side-text/index.spec.js @@ -21,9 +21,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration text content mismatch on:

bye!

-- rendered on server:hello! -- expected on client:bye!`, + 'Hydration text content mismatch on: P - rendered on server: hello! - expected on client: bye!', ], }); }, diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/host-mutation-in-connected-callback/attr-mutated-class-mismatch/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/host-mutation-in-connected-callback/attr-mutated-class-mismatch/index.spec.js index 86722145b9..7a2d7b0ed9 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/host-mutation-in-connected-callback/attr-mutated-class-mismatch/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/host-mutation-in-connected-callback/attr-mutated-class-mismatch/index.spec.js @@ -27,9 +27,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on: -- rendered on server:class="is-server" -- expected on client:class="is-client"`, + 'Hydration attribute mismatch on: X-CHILD - rendered on server: class="is-server" - expected on client: class="is-client"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/host-mutation-in-connected-callback/class-mutated-attr-mismatch/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/host-mutation-in-connected-callback/class-mutated-attr-mismatch/index.spec.js index 8bd8f71a25..b2b2ec4afd 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/host-mutation-in-connected-callback/class-mutated-attr-mismatch/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/host-mutation-in-connected-callback/class-mutated-attr-mismatch/index.spec.js @@ -26,9 +26,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on: -- rendered on server:data-mismatched-attr="is-server" -- expected on client:data-mismatched-attr="is-client"`, + 'Hydration attribute mismatch on: X-CHILD - rendered on server: data-mismatched-attr="is-server" - expected on client: data-mismatched-attr="is-client"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/invalid-number-of-nodes/foreach/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/invalid-number-of-nodes/foreach/index.spec.js index 5928702375..ad8349c7f7 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/invalid-number-of-nodes/foreach/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/invalid-number-of-nodes/foreach/index.spec.js @@ -18,9 +18,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration child node mismatch on: -- rendered on server:
  • red
  • ,
  • blue
  • ,
  • green
  • -- expected on client:
  • red
  • ,
  • blue
  • `, + 'Hydration child node mismatch on: UL - rendered on server: LI,LI,LI - expected on client: LI,LI', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/invalid-number-of-nodes/if-true/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/invalid-number-of-nodes/if-true/index.spec.js index 69c1391c53..4d8b727cdc 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/invalid-number-of-nodes/if-true/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/invalid-number-of-nodes/if-true/index.spec.js @@ -18,9 +18,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration child node mismatch on: -- rendered on server:
  • red
  • ,
  • blue
  • ,
  • green
  • -- expected on client:
  • red
  • ,,
  • blue
  • `, + 'Hydration child node mismatch on: UL - rendered on server: LI,LI,LI - expected on client: LI,,LI', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/sibling-issue/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/sibling-issue/index.spec.js index 9538066d25..7c3c8d9ff3 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/sibling-issue/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/sibling-issue/index.spec.js @@ -19,9 +19,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration child node mismatch on:
    -- rendered on server: -- expected on client:`, + 'Hydration child node mismatch on: #document-fragment - rendered on server: - expected on client: #comment', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/computed/different-priority/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/computed/different-priority/index.spec.js index c7567aa215..12e03015d9 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/computed/different-priority/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/computed/different-priority/index.spec.js @@ -24,9 +24,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on:

    txt

    -- rendered on server:style="background-color: red; border-color: red;" -- expected on client:style="background-color: red; border-color: red !important;"`, + 'Hydration attribute mismatch on: P - rendered on server: style="background-color: red; border-color: red;" - expected on client: style="background-color: red; border-color: red !important;"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/computed/extra-from-client/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/computed/extra-from-client/index.spec.js index a55f0fb7b1..b8d1eb0d51 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/computed/extra-from-client/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/computed/extra-from-client/index.spec.js @@ -24,9 +24,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on:

    txt

    -- rendered on server:style="background-color: red; border-color: red;" -- expected on client:style="background-color: red; border-color: red; margin: 1px;"`, + 'Hydration attribute mismatch on: P - rendered on server: style="background-color: red; border-color: red;" - expected on client: style="background-color: red; border-color: red; margin: 1px;"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/computed/extra-from-server/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/computed/extra-from-server/index.spec.js index 0233bd523c..d99f237968 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/computed/extra-from-server/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/computed/extra-from-server/index.spec.js @@ -22,9 +22,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on:

    txt

    -- rendered on server:style="background-color: red; border-color: red; margin: 1px;" -- expected on client:style="background-color: red; border-color: red;"`, + 'Hydration attribute mismatch on: P - rendered on server: style="background-color: red; border-color: red; margin: 1px;" - expected on client: style="background-color: red; border-color: red;"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/computed/same-different-order/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/computed/same-different-order/index.spec.js index 92c4b22345..2ff50a51cf 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/computed/same-different-order/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/computed/same-different-order/index.spec.js @@ -23,9 +23,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on:

    txt

    -- rendered on server:style="background-color: red; border-color: red; margin: 1px;" -- expected on client:style="margin: 1px; border-color: red; background-color: red;"`, + 'Hydration attribute mismatch on: P - rendered on server: style="background-color: red; border-color: red; margin: 1px;" - expected on client: style="margin: 1px; border-color: red; background-color: red;"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/empty-string/empty-on-client-nonempty-on-server/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/empty-string/empty-on-client-nonempty-on-server/index.spec.js index 0779c3a39c..6ddfc6333b 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/empty-string/empty-on-client-nonempty-on-server/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/empty-string/empty-on-client-nonempty-on-server/index.spec.js @@ -20,9 +20,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on:

    text

    -- rendered on server:style="color: burlywood;" -- expected on client:style=""`, + 'Hydration attribute mismatch on: P - rendered on server: style="color: burlywood;" - expected on client: style=""', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/empty-string/empty-on-server-nonempty-on-client/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/empty-string/empty-on-server-nonempty-on-client/index.spec.js index 14239305cc..165632f127 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/empty-string/empty-on-server-nonempty-on-client/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/empty-string/empty-on-server-nonempty-on-client/index.spec.js @@ -20,9 +20,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on:

    text

    -- rendered on server:style="" -- expected on client:style="color: burlywood;"`, + 'Hydration attribute mismatch on: P - rendered on server: style="" - expected on client: style="color: burlywood;"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/static/different-priority/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/static/different-priority/index.spec.js index 900bae51bd..5b8bce2a31 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/static/different-priority/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/static/different-priority/index.spec.js @@ -24,9 +24,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on:

    txt

    -- rendered on server:style="background-color: red; border-color: red;" -- expected on client:style="background-color: red; border-color: red !important;"`, + 'Hydration attribute mismatch on: P - rendered on server: style="background-color: red; border-color: red;" - expected on client: style="background-color: red; border-color: red !important;"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/static/extra-from-client/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/static/extra-from-client/index.spec.js index 14f08a8cc0..80d6f8c25e 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/static/extra-from-client/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/static/extra-from-client/index.spec.js @@ -24,9 +24,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on:

    txt

    -- rendered on server:style="background-color: red; border-color: red;" -- expected on client:style="background-color: red; border-color: red; margin: 1px;"`, + 'Hydration attribute mismatch on: P - rendered on server: style="background-color: red; border-color: red;" - expected on client: style="background-color: red; border-color: red; margin: 1px;"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/static/extra-from-server/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/static/extra-from-server/index.spec.js index 8fbe2b1a67..fa083bb3ed 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/static/extra-from-server/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/static/extra-from-server/index.spec.js @@ -22,9 +22,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on:

    txt

    -- rendered on server:style="background-color: red; border-color: red; margin: 1px;" -- expected on client:style="background-color: red; border-color: red;"`, + 'Hydration attribute mismatch on: P - rendered on server: style="background-color: red; border-color: red; margin: 1px;" - expected on client: style="background-color: red; border-color: red;"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/static/same-different-order/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/static/same-different-order/index.spec.js index 50f2cf7f51..1af0f66807 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/static/same-different-order/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/style-attr/static/same-different-order/index.spec.js @@ -30,9 +30,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on:

    txt

    -- rendered on server:style="background-color: red; border-color: red; margin: 1px;" -- expected on client:style="margin: 1px; border-color: red; background-color: red;"`, + 'Hydration attribute mismatch on: P - rendered on server: style="background-color: red; border-color: red; margin: 1px;" - expected on client: style="margin: 1px; border-color: red; background-color: red;"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/text-instead-of-comment/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/text-instead-of-comment/index.spec.js index a54855577d..ff771b9486 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/text-instead-of-comment/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/text-instead-of-comment/index.spec.js @@ -20,9 +20,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration node mismatch on:text -- rendered on server: -- expected on client:text`, + 'Hydration node mismatch on: #text - rendered on server: #comment - expected on client: #text', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/textNode-instead-of-element/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/textNode-instead-of-element/index.spec.js index d2fd73ec39..f344bf2f39 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/textNode-instead-of-element/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/textNode-instead-of-element/index.spec.js @@ -22,9 +22,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration node mismatch on:text -- rendered on server:text -- expected on client:text`, + 'Hydration node mismatch on: SPAN - rendered on server: #text - expected on client: SPAN', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/with-validation-opt-out/mutate-in-connected-and-render/no-opt-out/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/with-validation-opt-out/mutate-in-connected-and-render/no-opt-out/index.spec.js index 4618ffe519..b1ac944738 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/with-validation-opt-out/mutate-in-connected-and-render/no-opt-out/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/with-validation-opt-out/mutate-in-connected-and-render/no-opt-out/index.spec.js @@ -11,9 +11,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on: -- rendered on server:data-mutate-during-render="true" -- expected on client:data-mutate-during-render="false"`, + 'Hydration attribute mismatch on: X-CHILD - rendered on server: data-mutate-during-render="true" - expected on client: data-mutate-during-render="false"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/with-validation-opt-out/mutate-in-connected-and-render/opt-out-wrong-array/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/with-validation-opt-out/mutate-in-connected-and-render/opt-out-wrong-array/index.spec.js index 4618ffe519..b1ac944738 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/with-validation-opt-out/mutate-in-connected-and-render/opt-out-wrong-array/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/with-validation-opt-out/mutate-in-connected-and-render/opt-out-wrong-array/index.spec.js @@ -11,9 +11,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on: -- rendered on server:data-mutate-during-render="true" -- expected on client:data-mutate-during-render="false"`, + 'Hydration attribute mismatch on: X-CHILD - rendered on server: data-mutate-during-render="true" - expected on client: data-mutate-during-render="false"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/mismatches/with-validation-opt-out/number-of-child-els/index.spec.js b/packages/@lwc/integration-karma/test-hydration/mismatches/with-validation-opt-out/number-of-child-els/index.spec.js index 14da4afad5..81767e378e 100644 --- a/packages/@lwc/integration-karma/test-hydration/mismatches/with-validation-opt-out/number-of-child-els/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/mismatches/with-validation-opt-out/number-of-child-els/index.spec.js @@ -17,9 +17,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration child node mismatch on: -- rendered on server:
    foo
    -- expected on client:
    foo
    ,
    bar
    `, + 'Hydration child node mismatch on: X-CHILD - rendered on server: DIV - expected on client: DIV,DIV', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/stylesheet/host-scope-token/dynamic-render/mismatches/extra-class-in-client/index.spec.js b/packages/@lwc/integration-karma/test-hydration/stylesheet/host-scope-token/dynamic-render/mismatches/extra-class-in-client/index.spec.js index f92f9c7efc..f7c8d8885b 100644 --- a/packages/@lwc/integration-karma/test-hydration/stylesheet/host-scope-token/dynamic-render/mismatches/extra-class-in-client/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/stylesheet/host-scope-token/dynamic-render/mismatches/extra-class-in-client/index.spec.js @@ -21,9 +21,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on: -- rendered on server:class="" -- expected on client:class="foo"`, + 'Hydration attribute mismatch on: X-CHILD - rendered on server: class="" - expected on client: class="foo"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/stylesheet/host-scope-token/dynamic-render/mismatches/extra-class-in-server/index.spec.js b/packages/@lwc/integration-karma/test-hydration/stylesheet/host-scope-token/dynamic-render/mismatches/extra-class-in-server/index.spec.js index f6a022859d..4acd35718b 100644 --- a/packages/@lwc/integration-karma/test-hydration/stylesheet/host-scope-token/dynamic-render/mismatches/extra-class-in-server/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/stylesheet/host-scope-token/dynamic-render/mismatches/extra-class-in-server/index.spec.js @@ -21,9 +21,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on: -- rendered on server:class="foo" -- expected on client:class=""`, + 'Hydration attribute mismatch on: X-CHILD - rendered on server: class="foo" - expected on client: class=""', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/stylesheet/host-scope-token/dynamic-render/mismatches/wrong-scoped-template/index.spec.js b/packages/@lwc/integration-karma/test-hydration/stylesheet/host-scope-token/dynamic-render/mismatches/wrong-scoped-template/index.spec.js index 23c22870c1..db3cf06daf 100644 --- a/packages/@lwc/integration-karma/test-hydration/stylesheet/host-scope-token/dynamic-render/mismatches/wrong-scoped-template/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/stylesheet/host-scope-token/dynamic-render/mismatches/wrong-scoped-template/index.spec.js @@ -28,12 +28,8 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on: -- rendered on server:class="lwc-3hsmkt14797" -- expected on client:class="lwc-2fs4h5b0o15"`, - `Hydration attribute mismatch on:

    a

    -- rendered on server:class="lwc-3hsmkt14797" -- expected on client:class="lwc-2fs4h5b0o15"`, + 'Hydration attribute mismatch on: STYLE - rendered on server: class="lwc-3hsmkt14797" - expected on client: class="lwc-2fs4h5b0o15"', + 'Hydration attribute mismatch on: H1 - rendered on server: class="lwc-3hsmkt14797" - expected on client: class="lwc-2fs4h5b0o15"', 'Hydration completed with errors.', ], }); diff --git a/packages/@lwc/integration-karma/test-hydration/stylesheet/host-scope-token/dynamic-render/mismatches/wrong-single-class/index.spec.js b/packages/@lwc/integration-karma/test-hydration/stylesheet/host-scope-token/dynamic-render/mismatches/wrong-single-class/index.spec.js index ee0f715153..388999fb67 100644 --- a/packages/@lwc/integration-karma/test-hydration/stylesheet/host-scope-token/dynamic-render/mismatches/wrong-single-class/index.spec.js +++ b/packages/@lwc/integration-karma/test-hydration/stylesheet/host-scope-token/dynamic-render/mismatches/wrong-single-class/index.spec.js @@ -21,9 +21,7 @@ export default { TestUtils.expectConsoleCallsDev(consoleCalls, { error: [], warn: [ - `Hydration attribute mismatch on: -- rendered on server:class="foo" -- expected on client:class="bar"`, + 'Hydration attribute mismatch on: X-CHILD - rendered on server: class="foo" - expected on client: class="bar"', 'Hydration completed with errors.', ], });