@ -6,7 +6,7 @@ export default test({
dev : true
} ,
html : ` <button>items: null</button> <div>x</div> <input type="checkbox" value="1"><input type="checkbox" value="2"> ` ,
html : ` <button>items: null</button> <div>x</div> <input type="checkbox" value="1"><input type="checkbox" value="2"> <input> ` ,
test ( { assert , target , warnings } ) {
const btn = target . querySelector ( 'button' ) ;
@ -15,13 +15,13 @@ export default test({
flushSync ( ( ) => btn . click ( ) ) ;
assert . htmlEqual (
target . innerHTML ,
` <button>items: []</button> <div>x</div> <input type="checkbox" value="1"><input type="checkbox" value="2"> `
` <button>items: []</button> <div>x</div> <input type="checkbox" value="1"><input type="checkbox" value="2"> <input> `
) ;
flushSync ( ( ) => btn . click ( ) ) ;
assert . htmlEqual (
target . innerHTML ,
` <button>items: [0]</button> <div>x</div> <input type="checkbox" value="1"><input type="checkbox" value="2"> `
` <button>items: [0]</button> <div>x</div> <input type="checkbox" value="1"><input type="checkbox" value="2"> <input> `
) ;
const input = target . querySelector ( 'input' ) ;
@ -30,7 +30,7 @@ export default test({
flushSync ( ( ) => input . dispatchEvent ( new Event ( 'change' , { bubbles : true } ) ) ) ;
assert . deepEqual ( warnings , [
'Assignment to `items` property (main.svelte: 8 :24) will evaluate to the right-hand side, not the value of `items` following the assignment. This may result in unexpected behaviour.'
'Assignment to `items` property (main.svelte: 9 :24) will evaluate to the right-hand side, not the value of `items` following the assignment. This may result in unexpected behaviour.'
] ) ;
}
} ) ;