@@ -49,6 +49,10 @@ const SKIPPED_COMPONENTS: Record<string, string> = {
4949 'Button/Group.vue' : "Wrapper component, tests wouldn't make much sense here" ,
5050}
5151
52+ function normalizeComponentPath ( filePath : string ) : string {
53+ return filePath . replaceAll ( '\\' , '/' )
54+ }
55+
5256/**
5357 * Recursively get all Vue component files in a directory.
5458 */
@@ -62,7 +66,7 @@ function getVueFiles(dir: string, baseDir: string = dir): string[] {
6266 files . push ( ...getVueFiles ( fullPath , baseDir ) )
6367 } else if ( entry . isFile ( ) && entry . name . endsWith ( '.vue' ) ) {
6468 // Get relative path from base components directory
65- files . push ( path . relative ( baseDir , fullPath ) )
69+ files . push ( normalizeComponentPath ( path . relative ( baseDir , fullPath ) ) )
6670 }
6771 }
6872
@@ -87,7 +91,7 @@ function parseComponentsDeclaration(dtsPath: string): Map<string, string[]> {
8791 let match
8892 while ( ( match = exportRegex . exec ( content ) ) !== null ) {
8993 const componentName = match [ 1 ] !
90- const filePath = match [ 2 ] !
94+ const filePath = normalizeComponentPath ( match [ 2 ] ! )
9195
9296 const existing = componentMap . get ( componentName ) || [ ]
9397 if ( ! existing . includes ( filePath ) ) {
@@ -116,7 +120,7 @@ function getTestedComponents(
116120 let match
117121
118122 while ( ( match = directImportRegex . exec ( testFileContent ) ) !== null ) {
119- tested . add ( match [ 1 ] ! )
123+ tested . add ( normalizeComponentPath ( match [ 1 ] ! ) )
120124 }
121125
122126 // Match #components imports like:
0 commit comments