]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
test: fix script setup directive test
authorEvan You <yyx990803@gmail.com>
Mon, 28 Jun 2021 22:55:27 +0000 (18:55 -0400)
committerEvan You <yyx990803@gmail.com>
Mon, 28 Jun 2021 22:55:27 +0000 (18:55 -0400)
packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap
packages/compiler-sfc/__tests__/compileScript.spec.ts

index 36604db2576930ef929ec228ee210b21cf458e3c..6c3586544a8d62abda446ddadd8e3870c02fcdff 100644 (file)
@@ -304,7 +304,7 @@ exports[`SFC compile <script setup> inlineTemplate mode referencing scope compon
 
 import ChildComp from './Child.vue'
         import SomeOtherComp from './Other.vue'
-        import myDir from './my-dir'
+        import vMyDir from './my-dir'
         
 export default {
   setup(__props) {
@@ -313,7 +313,7 @@ export default {
 return (_ctx, _cache) => {
   return (_openBlock(), _createBlock(_Fragment, null, [
     _withDirectives(_createVNode(\\"div\\", null, null, 512 /* NEED_PATCH */), [
-      [_unref(myDir)]
+      [_unref(vMyDir)]
     ]),
     _createVNode(ChildComp),
     _createVNode(SomeOtherComp)
index caf56fab59e39f8c311c8cb8013020c9e01d0508..eae846ee517367968bd89a43c8f919075f1f5c52 100644 (file)
@@ -271,7 +271,7 @@ defineExpose({ foo: 123 })
         <script setup>
         import ChildComp from './Child.vue'
         import SomeOtherComp from './Other.vue'
-        import myDir from './my-dir'
+        import vMyDir from './my-dir'
         </script>
         <template>
           <div v-my-dir></div>
@@ -281,7 +281,7 @@ defineExpose({ foo: 123 })
         `,
         { inlineTemplate: true }
       )
-      expect(content).toMatch('[_unref(myDir)]')
+      expect(content).toMatch('[_unref(vMyDir)]')
       expect(content).toMatch('_createVNode(ChildComp)')
       // kebab-case component support
       expect(content).toMatch('_createVNode(SomeOtherComp)')