test: fix script setup directive test
This commit is contained in:
parent
211793d376
commit
fd7fa6f694
@ -304,7 +304,7 @@ exports[`SFC compile <script setup> inlineTemplate mode referencing scope compon
|
|||||||
|
|
||||||
import ChildComp from './Child.vue'
|
import ChildComp from './Child.vue'
|
||||||
import SomeOtherComp from './Other.vue'
|
import SomeOtherComp from './Other.vue'
|
||||||
import myDir from './my-dir'
|
import vMyDir from './my-dir'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
setup(__props) {
|
setup(__props) {
|
||||||
@ -313,7 +313,7 @@ export default {
|
|||||||
return (_ctx, _cache) => {
|
return (_ctx, _cache) => {
|
||||||
return (_openBlock(), _createBlock(_Fragment, null, [
|
return (_openBlock(), _createBlock(_Fragment, null, [
|
||||||
_withDirectives(_createVNode(\\"div\\", null, null, 512 /* NEED_PATCH */), [
|
_withDirectives(_createVNode(\\"div\\", null, null, 512 /* NEED_PATCH */), [
|
||||||
[_unref(myDir)]
|
[_unref(vMyDir)]
|
||||||
]),
|
]),
|
||||||
_createVNode(ChildComp),
|
_createVNode(ChildComp),
|
||||||
_createVNode(SomeOtherComp)
|
_createVNode(SomeOtherComp)
|
||||||
|
@ -271,7 +271,7 @@ defineExpose({ foo: 123 })
|
|||||||
<script setup>
|
<script setup>
|
||||||
import ChildComp from './Child.vue'
|
import ChildComp from './Child.vue'
|
||||||
import SomeOtherComp from './Other.vue'
|
import SomeOtherComp from './Other.vue'
|
||||||
import myDir from './my-dir'
|
import vMyDir from './my-dir'
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div v-my-dir></div>
|
<div v-my-dir></div>
|
||||||
@ -281,7 +281,7 @@ defineExpose({ foo: 123 })
|
|||||||
`,
|
`,
|
||||||
{ inlineTemplate: true }
|
{ inlineTemplate: true }
|
||||||
)
|
)
|
||||||
expect(content).toMatch('[_unref(myDir)]')
|
expect(content).toMatch('[_unref(vMyDir)]')
|
||||||
expect(content).toMatch('_createVNode(ChildComp)')
|
expect(content).toMatch('_createVNode(ChildComp)')
|
||||||
// kebab-case component support
|
// kebab-case component support
|
||||||
expect(content).toMatch('_createVNode(SomeOtherComp)')
|
expect(content).toMatch('_createVNode(SomeOtherComp)')
|
||||||
|
Loading…
Reference in New Issue
Block a user