MCPcopy
hub / github.com/vuejs/core / transformWithVText

Function transformWithVText

packages/compiler-dom/__tests__/transforms/vText.spec.ts:13–23  ·  view source on GitHub ↗
(template: string, options: CompilerOptions = {})

Source from the content-addressed store, hash-verified

11import { DOMErrorCodes } from '../../src/errors'
12
13function transformWithVText(template: string, options: CompilerOptions = {}) {
14 const ast = parse(template)
15 transform(ast, {
16 nodeTransforms: [transformElement],
17 directiveTransforms: {
18 text: transformVText,
19 },
20 ...options,
21 })
22 return ast
23}
24
25describe('compiler: v-text transform', () => {
26 it('should convert v-text to textContent', () => {

Callers 1

vText.spec.tsFile · 0.85

Calls 2

transformFunction · 0.90
parseFunction · 0.50

Tested by

no test coverage detected