File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
documentation/docs/07-misc Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -129,12 +129,12 @@ test('Effect', () => {
129
129
// effects normally run after a microtask,
130
130
// use flushSync to execute all pending effects synchronously
131
131
flushSync ();
132
- expect (log . value ).toEqual ([0 ]);
132
+ expect (log).toEqual ([0 ]);
133
133
134
134
count = 1 ;
135
135
flushSync ();
136
136
137
- expect (log . value ).toEqual ([0 , 1 ]);
137
+ expect (log).toEqual ([0 , 1 ]);
138
138
});
139
139
140
140
cleanup ();
@@ -148,17 +148,13 @@ test('Effect', () => {
148
148
*/
149
149
export function logger (getValue ) {
150
150
/** @type {any[]} */
151
- let log = $state ([]) ;
151
+ let log = [] ;
152
152
153
153
$effect (() => {
154
154
log .push (getValue ());
155
155
});
156
156
157
- return {
158
- get value () {
159
- return log;
160
- }
161
- };
157
+ return log;
162
158
}
163
159
```
164
160
You can’t perform that action at this time.
0 commit comments