Skip to content

Commit 157b7ac

Browse files
committed
fix failing test
1 parent 357145f commit 157b7ac

File tree

1 file changed

+4
-10
lines changed
  • packages/svelte/tests/runtime-runes/samples/inspect-recursive-2

1 file changed

+4
-10
lines changed

packages/svelte/tests/runtime-runes/samples/inspect-recursive-2/main.svelte

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
11
<script>
22
class A {
3-
toJSON(){
4-
return {
5-
a: this
6-
}
3+
constructor() {
4+
this.a = this;
75
}
86
}
97
const state = $state(new A());
108
$inspect(state);
119
1210
class B {
13-
toJSON(){
14-
return {
15-
a: {
16-
b: this
17-
}
18-
}
11+
constructor() {
12+
this.a = { b: this };
1913
}
2014
}
2115
const state2 = $state(new B());

0 commit comments

Comments
 (0)