src/goTest/resolve: fix Windows path handling

Fixes golang/vscode-go#1778

Change-Id: Ia9029ea6fbaad3701dbceeef463884104dadd2ea
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/350738
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
diff --git a/src/goTest/resolve.ts b/src/goTest/resolve.ts
index b5e342a..ead2a47 100644
--- a/src/goTest/resolve.ts
+++ b/src/goTest/resolve.ts
@@ -304,11 +304,11 @@
 		let item: TestItem;
 
 		const nested = getGoConfig(uri).get('testExplorer.packageDisplayMode') === 'nested';
-		const modDir = await getModFolderPath(uri, true);
+		const modDir = Uri.file(await getModFolderPath(uri, true)); // TODO support non-file schemes
 		const wsfolder = workspace.getWorkspaceFolder(uri);
 		if (modDir) {
 			// If the package is in a module, add it as a child of the module
-			let parent = await this.getModule(uri.with({ path: modDir, query: '', fragment: '' }));
+			let parent = await this.getModule(modDir);
 			if (uri.path === parent.uri.path) {
 				return parent;
 			}