From ca8bc31311994078a2063f4883f29cbb8ef8a428 Mon Sep 17 00:00:00 2001 From: Sander Declerck Date: Wed, 10 Sep 2025 14:16:54 +0200 Subject: [PATCH] Add a more descriptive comment for the cygwin test --- .../src/shell-integration/supported-shells/bash.spec.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/safe-chain/src/shell-integration/supported-shells/bash.spec.js b/packages/safe-chain/src/shell-integration/supported-shells/bash.spec.js index bd82dfe..aa7159f 100644 --- a/packages/safe-chain/src/shell-integration/supported-shells/bash.spec.js +++ b/packages/safe-chain/src/shell-integration/supported-shells/bash.spec.js @@ -115,10 +115,13 @@ describe("Bash shell integration", () => { }); it("should use the correct startup file for cygwin bash on Windows", () => { + // Simulate Windows platform with Cygwin bash + // The mockStartupFile contains a path we cannot open, so we set it to something useless + // The cygpath -w command that is mocked, will return the windowsCygwinPath variable + // This simulates the conversion from /c/Users/... to C:\Users\... platform = "win32"; - // set windows path to the correct filename windowsCygwinPath = mockStartupFile; - mockStartupFile = "DUMMY"; // This will be overridden by the mocked execSync + mockStartupFile = "DUMMY"; const result = bash.setup(); assert.strictEqual(result, true);