Skip to content

Commit 539e53b

Browse files
committed
test(tsc): skip dts snapshots for specific cases
1 parent 76fcd82 commit 539e53b

File tree

2 files changed

+3
-28
lines changed

2 files changed

+3
-28
lines changed

packages/tsc/tests/__snapshots__/dts.spec.ts.snap

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,5 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

3-
exports[`vue-tsc-dts > Input: #4577/main.vue, Output: #4577/main.vue.d.ts 1`] = `
4-
"export type BaseRow = {
5-
value: string;
6-
};
7-
declare const _default: <Row extends BaseRow>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
8-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & {
9-
nonGeneric: string;
10-
rows: Row[];
11-
} & Partial<{}>> & import("vue").PublicProps;
12-
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
13-
attrs: any;
14-
slots: {
15-
default?: (props: {
16-
row: Row;
17-
}) => any;
18-
};
19-
emit: {};
20-
}>) => import("vue").VNode & {
21-
__ctx?: Awaited<typeof __VLS_setup>;
22-
};
23-
export default _default;
24-
type __VLS_PrettifyLocal<T> = {
25-
[K in keyof T as K]: T[K];
26-
} & {};
27-
"
28-
`;
29-
303
exports[`vue-tsc-dts > Input: empty-component/component.vue, Output: empty-component/component.vue.d.ts 1`] = `
314
"declare const _default: import("vue").DefineComponent2<{
325
setup(): void;

packages/tsc/tests/dts.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ describe('vue-tsc-dts', () => {
7171
});
7272

7373
function readFilesRecursive(dir: string) {
74+
if (path.relative(workspace, dir).startsWith('#')) {
75+
return [];
76+
}
7477
const result: string[] = [];
7578

7679
for (const file of fs.readdirSync(dir)) {
@@ -86,7 +89,6 @@ function readFilesRecursive(dir: string) {
8689
result.push(filepath);
8790
}
8891
}
89-
9092
return result;
9193
}
9294

0 commit comments

Comments
 (0)