Skip to content

Commit eaea5bf

Browse files
committed
chore: update tests
1 parent 7b1b7cf commit eaea5bf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/runtime-vapor/__tests__/dom/templateRef.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
nextTick,
2020
reactive,
2121
ref,
22+
shallowRef,
2223
useTemplateRef,
2324
watchEffect,
2425
} from '@vue/runtime-dom'
@@ -208,8 +209,8 @@ describe('api: template ref', () => {
208209
const { render } = define({
209210
setup() {
210211
return {
211-
foo: fooEl,
212-
bar: barEl,
212+
foo: shallowRef(fooEl),
213+
bar: shallowRef(barEl),
213214
}
214215
},
215216
render() {
@@ -251,6 +252,7 @@ describe('api: template ref', () => {
251252
})
252253
const { host } = render()
253254
expect(state.refKey).toBe(host.children[0])
255+
expect('Template ref "refKey" used on a non-ref value').toHaveBeenWarned()
254256
})
255257

256258
test('multiple root refs', () => {

0 commit comments

Comments
 (0)