We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3fe6813 commit 116bbdeCopy full SHA for 116bbde
packages/svelte/tests/signals/test.ts
@@ -725,4 +725,19 @@ describe('signals', () => {
725
assert.equal($.get(d), true);
726
};
727
});
728
+
729
+ test('deriveds read inside the root/branches are cleaned up', () => {
730
+ return () => {
731
+ const a = state(0);
732
733
+ const destroy = effect_root(() => {
734
+ const b = derived(() => $.get(a));
735
+ $.get(b);
736
+ });
737
738
+ destroy();
739
740
+ assert.deepEqual(a.reactions, null);
741
+ };
742
743
0 commit comments