File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
packages/svelte/tests/runtime-runes/samples/invalid-html-ssr Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -27,10 +27,15 @@ export default test({
27
27
log . length = 0 ;
28
28
} ,
29
29
30
- async test ( { assert, target } ) {
31
- assert . htmlEqual ( target . innerHTML , `<p></p><h1>foo</h1><p></p>` ) ;
32
- if ( log . length > 0 ) {
33
- assert . deepEqual ( log , [ 'Svelte SSR validation error:\n\n' ] ) ;
30
+ async test ( { assert, target, variant } ) {
31
+ await assert . htmlEqual ( target . innerHTML , `<p></p><h1>foo</h1><p></p>` ) ;
32
+ if ( variant === 'hydrate' ) {
33
+ assert . equal (
34
+ log [ 0 ] ,
35
+ `Svelte SSR validation error:\n\n<h1> is invalid inside <p>\n\n` +
36
+ 'Ensure your components render valid HTML as the browser will try to repair invalid HTML, ' +
37
+ 'which may result in content being shifted around and will likely result in a hydration mismatch.'
38
+ ) ;
34
39
}
35
40
}
36
41
} ) ;
You can’t perform that action at this time.
0 commit comments