Skip to content

Commit 88cbc3a

Browse files
test(tsc): remove typescript-next test (#5413)
1 parent 82d38b5 commit 88cbc3a

File tree

3 files changed

+7
-32
lines changed

3 files changed

+7
-32
lines changed

packages/tsc/tests/typecheck.spec.ts

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,7 @@ describe(`vue-tsc`, () => {
66

77
test(`TypeScript - Stable`, () => {
88
expect(
9-
getTscOutput('stable').sort()
10-
).toMatchInlineSnapshot(`
11-
[
12-
"test-workspace/tsc/failureFixtures/#3632/both.vue(3,1): error TS1109: Expression expected.",
13-
"test-workspace/tsc/failureFixtures/#3632/both.vue(7,1): error TS1109: Expression expected.",
14-
"test-workspace/tsc/failureFixtures/#3632/script.vue(3,1): error TS1109: Expression expected.",
15-
"test-workspace/tsc/failureFixtures/#3632/scriptSetup.vue(3,1): error TS1109: Expression expected.",
16-
"test-workspace/tsc/failureFixtures/#5071/withScript.vue(1,19): error TS1005: ';' expected.",
17-
"test-workspace/tsc/failureFixtures/#5071/withoutScript.vue(2,26): error TS1005: ';' expected.",
18-
"test-workspace/tsc/failureFixtures/directives/main.vue(12,2): error TS2578: Unused '@ts-expect-error' directive.",
19-
"test-workspace/tsc/failureFixtures/directives/main.vue(4,6): error TS2339: Property 'notExist' does not exist on type 'CreateComponentPublicInstanceWithMixins<Readonly<{} & {} & {}>, { exist: {}; }, {}, {}, {}, {}, {}, {}, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, ... 12 more ..., {}>'.",
20-
"test-workspace/tsc/failureFixtures/directives/main.vue(9,6): error TS2339: Property 'notExist' does not exist on type 'CreateComponentPublicInstanceWithMixins<Readonly<{} & {} & {}>, { exist: {}; }, {}, {}, {}, {}, {}, {}, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, ... 12 more ..., {}>'.",
21-
]
22-
`);
23-
});
24-
25-
const isUpdateEvent = process.env.npm_lifecycle_event === 'test:update';
26-
const isGithubActions = !!process.env.GITHUB_ACTIONS;
27-
28-
test.skipIf(!isUpdateEvent && isGithubActions)(`TypeScript - Next`, () => {
29-
expect(
30-
getTscOutput('next').sort()
9+
getTscOutput().sort()
3110
).toMatchInlineSnapshot(`
3211
[
3312
"test-workspace/tsc/failureFixtures/#3632/both.vue(3,1): error TS1109: Expression expected.",
@@ -44,7 +23,7 @@ describe(`vue-tsc`, () => {
4423
});
4524
});
4625

47-
function getTscOutput(tsVersion: 'stable' | 'next') {
26+
function getTscOutput() {
4827
const consoleOutput: string[] = [];
4928
const originalConsoleLog = process.stdout.write;
5029
const originalArgv = process.argv;
@@ -61,7 +40,7 @@ function getTscOutput(tsVersion: 'stable' | 'next') {
6140
];
6241
try {
6342
const tscPath = require.resolve(
64-
`typescript-${tsVersion}/lib/tsc`,
43+
`typescript/lib/tsc`,
6544
{ paths: [path.resolve(__dirname, '../../../test-workspace')] }
6645
);
6746
run(tscPath);

pnpm-lock.yaml

Lines changed: 3 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test-workspace/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
"private": true,
33
"version": "3.0.0-alpha.10",
44
"devDependencies": {
5-
"typescript-next": "npm:typescript@next",
6-
"typescript-stable": "npm:typescript@latest",
5+
"typescript": "latest",
76
"vue": "https://pkg.pr.new/vue@e1bc0eb02e22bc0c236e1471c11d96a368764b72",
87
"vue-component-type-helpers": "3.0.0-alpha.10",
98
"vue3.4": "npm:vue@3.4.38"

0 commit comments

Comments
 (0)