diff --git a/test-packages/test-utils/src/project.ts b/test-packages/test-utils/src/project.ts index d8c9c9d79..279e4cac3 100644 --- a/test-packages/test-utils/src/project.ts +++ b/test-packages/test-utils/src/project.ts @@ -16,10 +16,9 @@ import { WorkspaceSymbolRequest, WorkspaceSymbolParams } from '@volar/language-s const require = createRequire(import.meta.url); const dirname = path.dirname(fileURLToPath(import.meta.url)); -const pathToTemplatePackage = pathUtils.normalizeFilePath( - path.resolve(dirname, '../../../packages/template'), +const fileUriToTemplatePackage = pathUtils.filePathToUri( + path.resolve(dirname, '../../../packages/template').replace(':', '%3A') // encode windows drive `:` colon ); -const fileUriToTemplatePackage = pathUtils.filePathToUri(pathToTemplatePackage); const ROOT = pathUtils.normalizeFilePath(path.resolve(dirname, '../../ephemeral')); // You'd think this would exist, but... no? Accordingly, supply a minimal @@ -160,8 +159,9 @@ export class Project { volarEmbeddedContentUri.toString(), `volar-embedded-content://URI_ENCODED_PATH_TO/FILE`, ) - .replaceAll(this.filePath('.'), '/path/to/EPHEMERAL_TEST_PROJECT') - .replaceAll(fileUriToTemplatePackage, 'file:///PATH_TO_MODULE/@glint/template'); + .replaceAll(this.filePath('.').replace(':', '%3A'), '/path/to/EPHEMERAL_TEST_PROJECT') + .replaceAll(fileUriToTemplatePackage, 'file:///PATH_TO_MODULE/@glint/template') + .replaceAll('file:////', 'file:///'); return JSON.parse(normalized); }