avoid GC in signal/effect

This commit is contained in:
Schluffe
2026-08-25 16:21:48 +02:00
parent 05ec3f468d
commit 2bcd072667
8 changed files with 92 additions and 76 deletions
+4 -1
View File
@@ -13,7 +13,10 @@ test("createSignal", () => {
test("createEffect", () => {
const [test, setTest] = createSignal("foo");
const callback = vi.fn(test);
const callback = vi.fn(() => {
test();
test();
});
createEffect(callback);
expect(callback).toHaveBeenCalledTimes(1);