Skip to content

Commit 689d367

Browse files
committed
add test
1 parent 03fbfa7 commit 689d367

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

packages/svelte/src/internal/client/proxy.test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,16 @@ test('defines a property', () => {
7272
/state_descriptors_fixed/
7373
);
7474
});
75+
76+
test('does not re-proxy proxies', () => {
77+
const inner = proxy({ count: 0 });
78+
const outer = proxy({ inner });
79+
80+
assert.equal(inner.count, 0);
81+
assert.equal(outer.inner.count, 0);
82+
83+
inner.count += 1;
84+
85+
assert.equal(inner.count, 1);
86+
assert.equal(outer.inner.count, 1);
87+
});

0 commit comments

Comments
 (0)