ray-template/__test__/vue/renderNode.spec.tsx
2024-12-07 01:04:16 +08:00

15 lines
442 B
TypeScript

import { renderNode } from '../../src/utils/vue/render-node'
import createRefElement from '../utils/createRefElement'
describe('renderNode', () => {
it('should render string', () => {
const wrapper = createRefElement({
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
default: renderNode('hello world') as Function,
})
const text = wrapper.text()
expect(text).toBe('hello world')
})
})