Skip to content

Commit 5f2c029

Browse files
so1vejohnsoncodehk
andauthored
chore: update vue 2 tests (#3674)
Co-authored-by: Johnson Chu <[email protected]>
1 parent 03cf10f commit 5f2c029

File tree

7 files changed

+31
-43
lines changed

7 files changed

+31
-43
lines changed

packages/vue-test-workspace-vue-2/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"private": true,
3-
"name": "@volar/vue-test-workspace-vue-2",
3+
"name": "@vue/vue-test-workspace-vue-2",
44
"version": "1.8.19",
55
"license": "MIT",
66
"devDependencies": {
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
{
2-
"compilerOptions": {
3-
"lib": [
4-
"esnext",
5-
"dom"
6-
],
7-
"strict": true,
8-
"noUncheckedIndexedAccess": true,
9-
"noUnusedLocals": true,
10-
"noUnusedParameters": true,
11-
"skipLibCheck": true,
12-
"allowJs": true,
13-
"jsx": "preserve",
14-
},
15-
"include": [
16-
"**/*"
17-
]
2+
"compilerOptions": {
3+
"lib": [
4+
"esnext",
5+
"dom"
6+
],
7+
"strict": true,
8+
"noUncheckedIndexedAccess": true,
9+
"noUnusedLocals": true,
10+
"noUnusedParameters": true,
11+
"skipLibCheck": true,
12+
"allowJs": true,
13+
"jsx": "preserve",
14+
"baseUrl": ".",
15+
},
16+
"include": [
17+
"**/*"
18+
]
1819
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "../tsconfig.base.json",
3+
"include": ["**/*"]
4+
}

packages/vue-test-workspace-vue-2/vue-tsc/tsconfig.base.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"vueCompilerOptions": {
77
"target": 2.7,
88
"jsxSlots": true,
9-
"plugins": ["../../vue-language-plugin-pug"]
9+
"plugins": [ "../../vue-language-plugin-pug" ]
1010
},
11-
"include": []
11+
"include": [ ]
1212
}

packages/vue-test-workspace/LICENSE

-21
This file was deleted.

packages/vue-test-workspace/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"private": true,
3-
"name": "@volar/vue-test-workspace",
3+
"name": "@vue/vue-test-workspace",
44
"version": "1.8.19",
55
"license": "MIT",
66
"devDependencies": {

packages/vue-tsc/tests/index.spec.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,15 @@ const workspaceVue2 = path.resolve(__dirname, '../../vue-test-workspace-vue-2/vu
1010

1111
function prettyPath(path: string, isRoot: boolean) {
1212
const segments = path.split('/');
13-
return !isRoot ? segments.slice(segments.length - 2, segments.length).join('/') : segments[segments.length - 1];
13+
const slicePath = (seg: number) => segments
14+
.slice(segments.length - seg, segments.length)
15+
.join('/')
16+
.replace('/vue-tsc', '');
17+
return !isRoot ? slicePath(4) : slicePath(3);
1418
}
1519

1620
function collectTests(dir: string, depth = 2, isRoot: boolean = true): [filePath: string, isRoot: boolean][] {
17-
const tests: [filePath: string, isRoot: boolean][] = [];
21+
const tests: [filePath: string, isRoot: boolean][] = [];
1822

1923
if (depth <= 0) {
2024
return tests;

0 commit comments

Comments
 (0)