@@ -184,14 +184,14 @@ describe('<script setup> ref sugar', () => {
184
184
`let n = _ref(1), { a: __a, b: __c, d: __d = 1, e: __f = 2, ...__g } = (useFoo())`
185
185
)
186
186
expect ( content ) . toMatch ( `let { foo: __foo } = (useSomthing(() => 1))` )
187
- expect ( content ) . toMatch ( `\nconst a = _ref (__a);` )
188
- expect ( content ) . not . toMatch ( `\nconst b = _ref (__b);` )
189
- expect ( content ) . toMatch ( `\nconst c = _ref (__c);` )
190
- expect ( content ) . toMatch ( `\nconst d = _ref (__d);` )
191
- expect ( content ) . not . toMatch ( `\nconst e = _ref (__e);` )
192
- expect ( content ) . toMatch ( `\nconst f = _ref (__f);` )
193
- expect ( content ) . toMatch ( `\nconst g = _ref (__g);` )
194
- expect ( content ) . toMatch ( `\nconst foo = _ref (__foo);` )
187
+ expect ( content ) . toMatch ( `\nconst a = _shallowRef (__a);` )
188
+ expect ( content ) . not . toMatch ( `\nconst b = _shallowRef (__b);` )
189
+ expect ( content ) . toMatch ( `\nconst c = _shallowRef (__c);` )
190
+ expect ( content ) . toMatch ( `\nconst d = _shallowRef (__d);` )
191
+ expect ( content ) . not . toMatch ( `\nconst e = _shallowRef (__e);` )
192
+ expect ( content ) . toMatch ( `\nconst f = _shallowRef (__f);` )
193
+ expect ( content ) . toMatch ( `\nconst g = _shallowRef (__g);` )
194
+ expect ( content ) . toMatch ( `\nconst foo = _shallowRef (__foo);` )
195
195
expect ( content ) . toMatch (
196
196
`console.log(n.value, a.value, c.value, d.value, f.value, g.value, foo.value)`
197
197
)
@@ -216,9 +216,9 @@ describe('<script setup> ref sugar', () => {
216
216
expect ( content ) . toMatch (
217
217
`let n = _ref(1), [__a, __b = 1, ...__c] = (useFoo())`
218
218
)
219
- expect ( content ) . toMatch ( `\nconst a = _ref (__a);` )
220
- expect ( content ) . toMatch ( `\nconst b = _ref (__b);` )
221
- expect ( content ) . toMatch ( `\nconst c = _ref (__c);` )
219
+ expect ( content ) . toMatch ( `\nconst a = _shallowRef (__a);` )
220
+ expect ( content ) . toMatch ( `\nconst b = _shallowRef (__b);` )
221
+ expect ( content ) . toMatch ( `\nconst c = _shallowRef (__c);` )
222
222
expect ( content ) . toMatch ( `console.log(n.value, a.value, b.value, c.value)` )
223
223
expect ( content ) . toMatch ( `return { n, a, b, c }` )
224
224
expect ( bindings ) . toStrictEqual ( {
@@ -238,11 +238,11 @@ describe('<script setup> ref sugar', () => {
238
238
</script>` )
239
239
expect ( content ) . toMatch ( `let [{ a: { b: __b }}] = (useFoo())` )
240
240
expect ( content ) . toMatch ( `let { c: [__d, __e] } = (useBar())` )
241
- expect ( content ) . not . toMatch ( `\nconst a = _ref (__a);` )
242
- expect ( content ) . not . toMatch ( `\nconst c = _ref (__c);` )
243
- expect ( content ) . toMatch ( `\nconst b = _ref (__b);` )
244
- expect ( content ) . toMatch ( `\nconst d = _ref (__d);` )
245
- expect ( content ) . toMatch ( `\nconst e = _ref (__e);` )
241
+ expect ( content ) . not . toMatch ( `\nconst a = _shallowRef (__a);` )
242
+ expect ( content ) . not . toMatch ( `\nconst c = _shallowRef (__c);` )
243
+ expect ( content ) . toMatch ( `\nconst b = _shallowRef (__b);` )
244
+ expect ( content ) . toMatch ( `\nconst d = _shallowRef (__d);` )
245
+ expect ( content ) . toMatch ( `\nconst e = _shallowRef (__e);` )
246
246
expect ( content ) . toMatch ( `return { b, d, e }` )
247
247
expect ( bindings ) . toStrictEqual ( {
248
248
b : BindingTypes . SETUP_REF ,
0 commit comments