Skip to content

Commit af5ab88

Browse files
committed
fix: test
1 parent c39e3e2 commit af5ab88

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/test/managers/builtin/venvUtils.removeVenv.unit.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,18 @@ suite('venvUtils Path Validation', () => {
1515
}
1616

1717
// Test cases that represent drive roots
18-
const driveRoots = ['C:\\', 'D:\\', 'c:\\', 'C:/', 'C:'];
18+
// Note: path.normalize('C:') returns 'C:.' on Windows, so we exclude bare 'C:'
19+
// The actual drive roots we care about are 'C:\' style paths
20+
const driveRoots = ['C:\\', 'D:\\', 'c:\\', 'C:/'];
1921

2022
for (const root of driveRoots) {
2123
const normalized = path.normalize(root);
2224
const isDrive = /^[a-zA-Z]:[\\/]?$/.test(normalized);
23-
assert.strictEqual(isDrive, true, `${root} should be identified as drive root`);
25+
assert.strictEqual(
26+
isDrive,
27+
true,
28+
`${root} (normalized: ${normalized}) should be identified as drive root`,
29+
);
2430
}
2531
});
2632

0 commit comments

Comments
 (0)