Skip to content

Commit fd7fa6f

Browse files
committed
test: fix script setup directive test
1 parent 211793d commit fd7fa6f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ exports[`SFC compile <script setup> inlineTemplate mode referencing scope compon
304304
305305
import ChildComp from './Child.vue'
306306
import SomeOtherComp from './Other.vue'
307-
import myDir from './my-dir'
307+
import vMyDir from './my-dir'
308308
309309
export default {
310310
setup(__props) {
@@ -313,7 +313,7 @@ export default {
313313
return (_ctx, _cache) => {
314314
return (_openBlock(), _createBlock(_Fragment, null, [
315315
_withDirectives(_createVNode(\\"div\\", null, null, 512 /* NEED_PATCH */), [
316-
[_unref(myDir)]
316+
[_unref(vMyDir)]
317317
]),
318318
_createVNode(ChildComp),
319319
_createVNode(SomeOtherComp)

packages/compiler-sfc/__tests__/compileScript.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ defineExpose({ foo: 123 })
271271
<script setup>
272272
import ChildComp from './Child.vue'
273273
import SomeOtherComp from './Other.vue'
274-
import myDir from './my-dir'
274+
import vMyDir from './my-dir'
275275
</script>
276276
<template>
277277
<div v-my-dir></div>
@@ -281,7 +281,7 @@ defineExpose({ foo: 123 })
281281
`,
282282
{ inlineTemplate: true }
283283
)
284-
expect(content).toMatch('[_unref(myDir)]')
284+
expect(content).toMatch('[_unref(vMyDir)]')
285285
expect(content).toMatch('_createVNode(ChildComp)')
286286
// kebab-case component support
287287
expect(content).toMatch('_createVNode(SomeOtherComp)')

0 commit comments

Comments
 (0)