Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Aug 25, 2024
1 parent c1513c8 commit 4ec343a
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 38 deletions.
70 changes: 70 additions & 0 deletions packages/language-server/tests/renaming.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,76 @@ describe('Renaming', async () => {
`);
});

it('#4673', async () => {
expect(
await requestRename('fixture.vue', 'vue', `
<script setup lang="ts">
import { useCssModule } from 'vue';
const $style = useCssModule();
const stylAlias = useCssModule('styl');
</script>
<template>
<div :class="styl|.foo">{{ }}</div>
</template>
<style module>
.foo { }
</style>
<style module="styl">
.foo { }
</style>
`, 'stylus')
).toMatchInlineSnapshot(`
{
"changes": {
"file://\${testWorkspacePath}/fixture.vue": [
{
"newText": "stylus",
"range": {
"end": {
"character": 22,
"line": 8,
},
"start": {
"character": 18,
"line": 8,
},
},
},
{
"newText": "stylus",
"range": {
"end": {
"character": 23,
"line": 15,
},
"start": {
"character": 19,
"line": 15,
},
},
},
{
"newText": "stylus",
"range": {
"end": {
"character": 40,
"line": 4,
},
"start": {
"character": 36,
"line": 4,
},
},
},
],
},
}
`);
});

const openedDocuments: TextDocument[] = [];

afterEach(async () => {
Expand Down
19 changes: 0 additions & 19 deletions test-workspace/language-service/rename/#4673/input/entry.vue

This file was deleted.

19 changes: 0 additions & 19 deletions test-workspace/language-service/rename/#4673/output/entry.vue

This file was deleted.

0 comments on commit 4ec343a

Please sign in to comment.