avoid GC in signal/effect

This commit is contained in:
Schluffe committed 2026-08-25 16:21:48 +02:00
1 parent 05ec3f468d
commit 2bcd072667
8 files changed
+92 -76

No files matched your search

+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);