File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
runtime-runes/samples/props-id Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -252,6 +252,10 @@ export function append(anchor, dom) {
252252
253253let uid = 1 ;
254254
255+ export function reset_props_id ( ) {
256+ uid = 1 ;
257+ }
258+
255259/**
256260 * Create (or hydrate) an unique UID for the component instance.
257261 */
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { setup_html_equal } from '../html_equal.js';
1111import { raf } from '../animation-helpers.js' ;
1212import type { CompileOptions } from '#compiler' ;
1313import { suite_with_variants , type BaseTest } from '../suite.js' ;
14+ import { reset_props_id } from '../../src/internal/client/dom/template.js' ;
1415
1516type Assert = typeof import ( 'vitest' ) . assert & {
1617 htmlEqual ( a : string , b : string , description ?: string ) : void ;
@@ -345,6 +346,7 @@ async function run_test_variant(
345346
346347 if ( runes ) {
347348 props = proxy ( { ...( config . props || { } ) } ) ;
349+ reset_props_id ( ) ;
348350 if ( manual_hydrate ) {
349351 hydrate_fn = ( ) => {
350352 instance = hydrate ( mod . default , {
Original file line number Diff line number Diff line change @@ -43,8 +43,6 @@ export default test({
4343 `
4444 ) ;
4545 } else {
46- // `c6` because this runs after the `dom` tests
47- // (slightly brittle but good enough for now)
4846 assert . htmlEqual (
4947 target . innerHTML ,
5048 `
@@ -53,7 +51,7 @@ export default test({
5351 <p>s2</p>
5452 <p>s3</p>
5553 <p>s4</p>
56- <p>c6 </p>
54+ <p>c1 </p>
5755 `
5856 ) ;
5957 }
You can’t perform that action at this time.
0 commit comments