Files
element-plus/packages/utils/__tests__/vue/refs.test.ts
Noblet Ouways 630b66f4cc refactor: remove unused code related to tooltip-v2 (#22304)
* refactor: remove unused code related to tooltip-v2

* test: redo & rewrite refs test
2025-09-24 08:49:29 +08:00

15 lines
485 B
TypeScript

import { ref } from 'vue'
import { describe, expect, it } from 'vitest'
import { composeRefs } from '../..'
describe('composeRefs', () => {
it('should assign correctly the element to the given refs', () => {
const element = document.createElement('div')
const firstRef = ref<HTMLDivElement>()
const secondRef = ref<HTMLDivElement>()
composeRefs(firstRef, secondRef)(element)
expect(firstRef.value).toBe(element)
expect(secondRef.value).toBe(element)
})
})