Skip to content

Commit dc3b949

Browse files
authored
testing: fix case sensitivity in file coverage (#200666)
File Explorer does not show the coverage bar Fixes #200604
1 parent aec7664 commit dc3b949

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/vs/workbench/api/browser/mainThreadTesting.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export class MainThreadTesting extends Disposable implements MainThreadTestingSh
136136

137137
const fn = available ? ((token: CancellationToken) => TestCoverage.load(taskId, {
138138
provideFileCoverage: async token => await this.proxy.$provideFileCoverage(runId, taskId, token)
139-
.then(c => c.map(IFileCoverage.deserialize)),
139+
.then(c => c.map(u => IFileCoverage.deserialize(this.uriIdentityService, u))),
140140
resolveFileCoverage: (i, token) => this.proxy.$resolveFileCoverage(runId, taskId, i, token)
141141
.then(d => d.map(CoverageDetails.deserialize)),
142142
}, token)) : undefined;

src/vs/workbench/contrib/testing/common/testCoverageService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export class TestCoverageService extends Disposable implements ITestCoverageServ
8585
this._isOpenKey.set(true);
8686
} catch (e) {
8787
if (!cts.token.isCancellationRequested) {
88-
this.notificationService.error(localize('testCoverageError', 'Failed to load test coverage: {}', String(e)));
88+
this.notificationService.error(localize('testCoverageError', 'Failed to load test coverage: {0}', String(e)));
8989
}
9090
return;
9191
}

src/vs/workbench/contrib/testing/common/testTypes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,12 +571,12 @@ export namespace IFileCoverage {
571571
uri: original.uri.toJSON(),
572572
});
573573

574-
export const deserialize = (serialized: Serialized): IFileCoverage => ({
574+
export const deserialize = (uriIdentity: ITestUriCanonicalizer, serialized: Serialized): IFileCoverage => ({
575575
statement: serialized.statement,
576576
branch: serialized.branch,
577577
function: serialized.function,
578578
details: serialized.details?.map(CoverageDetails.deserialize),
579-
uri: URI.from(serialized.uri),
579+
uri: uriIdentity.asCanonicalUri(URI.revive(serialized.uri)),
580580
});
581581
}
582582

0 commit comments

Comments
 (0)