File tree 2 files changed +13
-4
lines changed
packages/svelte/tests/runtime-runes/samples/const-tag-boundary 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,16 @@ import { flushSync } from 'svelte';
2
2
import { test } from '../../test' ;
3
3
4
4
export default test ( {
5
- html : '<button></button> 2' ,
6
- mode : [ 'client' ]
7
- // TODO fix reactivity lost in failed snippet and add a test here
5
+ html : '<button></button><p>2</p>' ,
6
+ mode : [ 'client' ] ,
7
+ test ( { target, assert } ) {
8
+ const btn = target . querySelector ( 'button' ) ;
9
+ const p = target . querySelector ( 'p' ) ;
10
+
11
+ flushSync ( ( ) => {
12
+ btn ?. click ( ) ;
13
+ } ) ;
14
+
15
+ assert . equal ( p ?. innerHTML , '4' ) ;
16
+ }
8
17
} ) ;
Original file line number Diff line number Diff line change 8
8
<svelte:boundary >
9
9
{@const double = test * 2 }
10
10
{#snippet failed ()}
11
- {double }
11
+ < p > {double }</ p >
12
12
{/ snippet }
13
13
<FlakyComponent />
14
14
</svelte:boundary >
You can’t perform that action at this time.
0 commit comments