From de50847cb025af87092147365b837ee0563e44fa Mon Sep 17 00:00:00 2001 From: Ray Date: Mon, 26 Aug 2024 01:08:58 +0800 Subject: [PATCH] test(tsc): add tests for #3779, #3820 (#3838) --- .../language-server/tests/renaming.spec.ts | 2 +- .../tsc/passedFixtures/vue3.5/#3779/main.vue | 10 ++++++++++ .../tsc/passedFixtures/vue3.5/#3779/named.vue | 10 ++++++++++ .../tsc/passedFixtures/vue3.5/#3820/main.vue | 19 +++++++++++++++++++ .../tsc/passedFixtures/vue3.5/tsconfig.json | 1 + 5 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 test-workspace/tsc/passedFixtures/vue3.5/#3779/main.vue create mode 100644 test-workspace/tsc/passedFixtures/vue3.5/#3779/named.vue create mode 100644 test-workspace/tsc/passedFixtures/vue3.5/#3820/main.vue diff --git a/packages/language-server/tests/renaming.spec.ts b/packages/language-server/tests/renaming.spec.ts index c4a0356278..829b59f4e3 100644 --- a/packages/language-server/tests/renaming.spec.ts +++ b/packages/language-server/tests/renaming.spec.ts @@ -776,7 +776,7 @@ describe('Renaming', async () => { const position = document.positionAt(offset); const edit = await server.sendRenameRequest(document.uri, position, newName); - expect(edit).toBeDefined(); + expect(edit?.changes).toBeDefined(); for (const [uri, edits] of Object.entries(edit!.changes!)) { delete edit!.changes![uri]; diff --git a/test-workspace/tsc/passedFixtures/vue3.5/#3779/main.vue b/test-workspace/tsc/passedFixtures/vue3.5/#3779/main.vue new file mode 100644 index 0000000000..5fcef0b240 --- /dev/null +++ b/test-workspace/tsc/passedFixtures/vue3.5/#3779/main.vue @@ -0,0 +1,10 @@ + + + diff --git a/test-workspace/tsc/passedFixtures/vue3.5/#3779/named.vue b/test-workspace/tsc/passedFixtures/vue3.5/#3779/named.vue new file mode 100644 index 0000000000..5fcef0b240 --- /dev/null +++ b/test-workspace/tsc/passedFixtures/vue3.5/#3779/named.vue @@ -0,0 +1,10 @@ + + + diff --git a/test-workspace/tsc/passedFixtures/vue3.5/#3820/main.vue b/test-workspace/tsc/passedFixtures/vue3.5/#3820/main.vue new file mode 100644 index 0000000000..4c9321df33 --- /dev/null +++ b/test-workspace/tsc/passedFixtures/vue3.5/#3820/main.vue @@ -0,0 +1,19 @@ + + + diff --git a/test-workspace/tsc/passedFixtures/vue3.5/tsconfig.json b/test-workspace/tsc/passedFixtures/vue3.5/tsconfig.json index 574d756717..1e3a821a3c 100644 --- a/test-workspace/tsc/passedFixtures/vue3.5/tsconfig.json +++ b/test-workspace/tsc/passedFixtures/vue3.5/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "../../../tsconfig.base.json", "vueCompilerOptions": { + "lib": "vue3.5", "target": 3.5, }, "include": [