Skip to content

Commit

Permalink
resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocean-OS committed Dec 1, 2024
1 parent 24113b4 commit afe4dbe
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions packages/svelte/tests/signals/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,32 @@ describe('signals', () => {
};
});

test('nested deriveds clean up the relationships when used with untrack', () => {
return () => {
let a = render_effect(() => {});

const destroy = effect_root(() => {
a = render_effect(() => {
$.untrack(() => {
const b = derived(() => {
const c = derived(() => {});
$.untrack(() => {
$.get(c);
});
});
$.get(b);
});
});
});

assert.deepEqual(a.deriveds?.length, 1);

destroy();

assert.deepEqual(a.deriveds, null);
};
});

test('bigint states update correctly', () => {
return () => {
const count = state(0n);
Expand Down

0 comments on commit afe4dbe

Please sign in to comment.