fix(CI/CD): use path.resolve in expandHomePrefix test for Windows compat (#30961)
Merged via squash. Prepared head SHA: 26bc118517a68ecd41438a02d918fbcf8f3b171e Co-authored-by: cygaar <97691933+cygaar@users.noreply.github.com> Co-authored-by: velvet-shark <126378+velvet-shark@users.noreply.github.com> Reviewed-by: @velvet-shark
This commit is contained in:
@@ -316,7 +316,8 @@ describe("tilde expansion in file tools", () => {
|
||||
process.env.HOME = fakeHome;
|
||||
try {
|
||||
const result = expandHomePrefix("~/file.txt");
|
||||
expect(path.normalize(result)).toBe(path.join(path.resolve(fakeHome), "file.txt"));
|
||||
// path.resolve normalizes the HOME value (adds drive letter on Windows)
|
||||
expect(result).toBe(`${path.resolve(fakeHome)}/file.txt`);
|
||||
} finally {
|
||||
process.env.HOME = originalHome;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user