@@ -4,36 +4,35 @@ import { describe, expect, test } from 'vitest'
44// BindingTypes,
55// NodeTypes,
66// } from '@vue/compiler-core'
7- // import {
8- // IRDynamicPropsKind,
9- // IRNodeTypes,
10- // transformChildren,
11- // transformElement,
12- // transformText,
13- // transformVBind,
14- // transformVOn,
15- // } from '../../src/core/compiler/index'
16- import { compile } from '../compile.spec'
17- // import { makeCompile } from './_utils'
7+ import {
8+ // IRDynamicPropsKind,
9+ // IRNodeTypes,
10+ transformChildren ,
11+ transformElement ,
12+ transformText ,
13+ transformVBind ,
14+ transformVOn ,
15+ } from '../../src/core/compiler/index'
16+ import { makeCompile } from './_utils'
1817
19- const compileWithElementTransform = compile
20- // makeCompile({
21- // nodeTransforms: [transformElement, transformChildren, transformText],
22- // directiveTransforms: {
23- // bind: transformVBind,
24- // on: transformVOn,
25- // },
26- // })
18+ const compileWithElementTransform = makeCompile ( {
19+ nodeTransforms : [ transformElement , transformChildren , transformText ] ,
20+ directiveTransforms : {
21+ bind : transformVBind ,
22+ on : transformVOn ,
23+ } ,
24+ } )
2725
2826describe ( 'compiler: element transform' , ( ) => {
2927 describe ( 'component' , ( ) => {
3028 test ( 'import + resolve component' , ( ) => {
3129 const { code, vaporHelpers } = compileWithElementTransform ( `<Foo/>` )
3230 expect ( code ) . toMatchInlineSnapshot ( `
33- "import { createComponent as _createComponent } from 'vue/vapor';
31+ "import { resolveComponent as _resolveComponent, createComponent as _createComponent } from 'vue/vapor';
3432
3533 export function render(_ctx) {
36- const n0 = _createComponent(Foo, null, null, true)
34+ const _component_Foo = _resolveComponent("Foo")
35+ const n0 = _createComponent(_component_Foo, null, null, true)
3736 return n0
3837 }"
3938 ` )
0 commit comments