Skip to content

Commit d4767df

Browse files
committed
error fix
1 parent 18208e0 commit d4767df

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/test/testing/testController/common/projectTestExecution.unit.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,9 @@ suite('Project Test Execution', () => {
653653
// Mock
654654
const project = createMockProjectAdapter({ projectPath: '/workspace/proj', projectName: 'proj' });
655655
const mockCoverageDetails = [{ line: 1, executed: true }];
656-
project.resultResolver.detailedCoverageMap.set('/workspace/proj/file.py', mockCoverageDetails as any);
656+
// Use Uri.fsPath as the key to match the implementation's lookup
657+
const fileUri = Uri.file('/workspace/proj/file.py');
658+
project.resultResolver.detailedCoverageMap.set(fileUri.fsPath, mockCoverageDetails as any);
657659
const profileMock = ({
658660
kind: TestRunProfileKind.Coverage,
659661
loadDetailedCoverage: undefined,
@@ -664,7 +666,7 @@ suite('Project Test Execution', () => {
664666
setupCoverageForProject(request, project);
665667

666668
// Run - call the configured callback
667-
const fileCoverage = { uri: Uri.file('/workspace/proj/file.py') };
669+
const fileCoverage = { uri: fileUri };
668670
const result = await profileMock.loadDetailedCoverage!(
669671
{} as TestRun,
670672
fileCoverage as any,

0 commit comments

Comments
 (0)