Skip to content

Commit 2af2178

Browse files
committed
Update renaming.spec.ts
1 parent 1579d04 commit 2af2178

File tree

1 file changed

+12
-31
lines changed

1 file changed

+12
-31
lines changed

packages/language-server/tests/renaming.spec.ts

+12-31
Original file line numberDiff line numberDiff line change
@@ -337,34 +337,15 @@ describe('Renaming', async () => {
337337

338338
it('Component props', async () => {
339339
await ensureGlobalTypesHolder('tsconfigProject');
340-
expect(
341-
await prepareDocument('tsconfigProject/foo.vue', 'vue', `
342-
<template>
343-
<Comp :aaa-bbb="'foo'"></Comp>
344-
<Comp :aaaBbb="'foo'"></Comp>
345-
</template>
340+
await prepareDocument('tsconfigProject/foo.vue', 'vue', `
341+
<template>
342+
<Comp :aaa-bbb="'foo'"></Comp>
343+
<Comp :aaaBbb="'foo'"></Comp>
344+
</template>
346345
347-
<script lang="ts" setup>
348-
import Comp from './fixture.vue';
349-
</script>
350-
`)
351-
).toMatchInlineSnapshot(`
352-
FullTextDocument {
353-
"_content": "
354-
<template>
355-
<Comp :aaa-bbb="'foo'"></Comp>
356-
<Comp :aaaBbb="'foo'"></Comp>
357-
</template>
358-
359-
<script lang="ts" setup>
360-
import Comp from './fixture.vue';
361-
</script>
362-
",
363-
"_languageId": "vue",
364-
"_lineOffsets": undefined,
365-
"_uri": "file:///Users/johnsonchu/Desktop/volar/vue/test-workspace/tsconfigProject/foo.vue",
366-
"_version": 1,
367-
}
346+
<script lang="ts" setup>
347+
import Comp from './fixture.vue';
348+
</script>
368349
`);
369350
expect(
370351
await requestRename('tsconfigProject/fixture.vue', 'vue', `
@@ -412,11 +393,11 @@ describe('Renaming', async () => {
412393
"newText": "cccDdd",
413394
"range": {
414395
"end": {
415-
"character": 18,
396+
"character": 17,
416397
"line": 3,
417398
},
418399
"start": {
419-
"character": 12,
400+
"character": 11,
420401
"line": 3,
421402
},
422403
},
@@ -425,11 +406,11 @@ describe('Renaming', async () => {
425406
"newText": "ccc-ddd",
426407
"range": {
427408
"end": {
428-
"character": 19,
409+
"character": 18,
429410
"line": 2,
430411
},
431412
"start": {
432-
"character": 12,
413+
"character": 11,
433414
"line": 2,
434415
},
435416
},

0 commit comments

Comments
 (0)