test(scripts): align pnpm resolution expectation across platforms (#5519)

This commit is contained in:
shawn 2026-09-17 21:48:40 +08:00 committed by GitHub
parent 6a94bef908
commit aa1077fe23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,7 +31,8 @@ def test_find_pnpm_command_prefers_resolved_executable(monkeypatch):
monkeypatch.setattr(pnpm_script.shutil, "which", fake_which)
assert pnpm_script.find_pnpm_command() == [r"C:\Users\tester\AppData\Roaming\npm\pnpm.CMD"]
expected_path = r"C:\Users\tester\AppData\Roaming\npm\pnpm.cmd" if pnpm_script.os.name == "nt" else r"C:\Users\tester\AppData\Roaming\npm\pnpm.CMD"
assert pnpm_script.find_pnpm_command() == [expected_path]
def test_find_pnpm_command_falls_back_to_corepack(monkeypatch):