You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'The usage of `bind:this` can often be replaced with an easier to read `action` or even better an `attachment`. Consider using the latter if possible.',
531
+
);
532
+
});
533
+
534
+
it('should not add suggestions when using bind:this on a component',()=>{
535
+
constcontent=run_autofixers_on_code(`
536
+
<script>
537
+
import Child from './Child.svelte';
538
+
let a = $state();
539
+
</script>
540
+
541
+
<Child bind:this={a} />`);
542
+
543
+
expect(content.suggestions).not.toContain(
544
+
'The usage of `bind:this` can often be replaced with an easier to read `action` or even better an `attachment`. Consider using the latter if possible.',
545
+
);
546
+
});
547
+
548
+
it('should not add suggestions when using bind:this on a component nested in an element',()=>{
549
+
constcontent=run_autofixers_on_code(`
550
+
<script>
551
+
import Child from './Child.svelte';
552
+
let a = $state();
553
+
</script>
554
+
555
+
<div>
556
+
<Child bind:this={a} />
557
+
</div>`);
558
+
559
+
expect(content.suggestions).not.toContain(
560
+
'The usage of `bind:this` can often be replaced with an easier to read `action` or even better an `attachment`. Consider using the latter if possible.',
561
+
);
562
+
});
563
+
564
+
it('should add suggestions but not suggest attachments when using bind:this on an element and the desired svelte version is 4',()=>{
0 commit comments