Skip to content

Commit

Permalink
chore: update vue 2 tests (#3674)
Browse files Browse the repository at this point in the history
Co-authored-by: Johnson Chu <[email protected]>
  • Loading branch information
so1ve and johnsoncodehk authored Oct 23, 2023
1 parent 03cf10f commit 5f2c029
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 43 deletions.
2 changes: 1 addition & 1 deletion packages/vue-test-workspace-vue-2/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"name": "@volar/vue-test-workspace-vue-2",
"name": "@vue/vue-test-workspace-vue-2",
"version": "1.8.19",
"license": "MIT",
"devDependencies": {
Expand Down
33 changes: 17 additions & 16 deletions packages/vue-test-workspace-vue-2/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
{
"compilerOptions": {
"lib": [
"esnext",
"dom"
],
"strict": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"skipLibCheck": true,
"allowJs": true,
"jsx": "preserve",
},
"include": [
"**/*"
]
"compilerOptions": {
"lib": [
"esnext",
"dom"
],
"strict": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"skipLibCheck": true,
"allowJs": true,
"jsx": "preserve",
"baseUrl": ".",
},
"include": [
"**/*"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "../tsconfig.base.json",
"include": ["**/*"]
}
4 changes: 2 additions & 2 deletions packages/vue-test-workspace-vue-2/vue-tsc/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"vueCompilerOptions": {
"target": 2.7,
"jsxSlots": true,
"plugins": ["../../vue-language-plugin-pug"]
"plugins": [ "../../vue-language-plugin-pug" ]
},
"include": []
"include": [ ]
}
21 changes: 0 additions & 21 deletions packages/vue-test-workspace/LICENSE

This file was deleted.

2 changes: 1 addition & 1 deletion packages/vue-test-workspace/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"name": "@volar/vue-test-workspace",
"name": "@vue/vue-test-workspace",
"version": "1.8.19",
"license": "MIT",
"devDependencies": {
Expand Down
8 changes: 6 additions & 2 deletions packages/vue-tsc/tests/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ const workspaceVue2 = path.resolve(__dirname, '../../vue-test-workspace-vue-2/vu

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

function collectTests(dir: string, depth = 2, isRoot: boolean = true): [filePath: string, isRoot: boolean][] {
const tests: [filePath: string, isRoot: boolean][] = [];
const tests: [filePath: string, isRoot: boolean][] = [];

if (depth <= 0) {
return tests;
Expand Down

0 comments on commit 5f2c029

Please sign in to comment.