We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b1b7cf commit eaea5bfCopy full SHA for eaea5bf
packages/runtime-vapor/__tests__/dom/templateRef.spec.ts
@@ -19,6 +19,7 @@ import {
19
nextTick,
20
reactive,
21
ref,
22
+ shallowRef,
23
useTemplateRef,
24
watchEffect,
25
} from '@vue/runtime-dom'
@@ -208,8 +209,8 @@ describe('api: template ref', () => {
208
209
const { render } = define({
210
setup() {
211
return {
- foo: fooEl,
212
- bar: barEl,
+ foo: shallowRef(fooEl),
213
+ bar: shallowRef(barEl),
214
}
215
},
216
render() {
@@ -251,6 +252,7 @@ describe('api: template ref', () => {
251
252
})
253
const { host } = render()
254
expect(state.refKey).toBe(host.children[0])
255
+ expect('Template ref "refKey" used on a non-ref value').toHaveBeenWarned()
256
257
258
test('multiple root refs', () => {
0 commit comments