Skip to content

Commit dc46c9e

Browse files
committed
test(doctor): preserve Linux warning assertion
1 parent 149c95c commit dc46c9e

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

‎src/commands/doctor/shared/legacy-oauth-sidecar.test.ts‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,13 @@ describe("loadLegacyOAuthSidecarMaterial keychain-only headless warning", () =>
102102
env,
103103
});
104104

105+
restorePlatform();
106+
restorePlatform = setPlatform("linux");
107+
expect(load()).toBeNull();
108+
expect(warnSpy).not.toHaveBeenCalled();
109+
110+
restorePlatform();
111+
restorePlatform = setPlatform("darwin");
105112
expect(load()).toBeNull();
106113
expect(warnSpy).toHaveBeenCalledTimes(1);
107114
const [firstMessage] = warnSpy.mock.calls[0] as [unknown];
@@ -110,10 +117,5 @@ describe("loadLegacyOAuthSidecarMaterial keychain-only headless warning", () =>
110117

111118
expect(load()).toBeNull();
112119
expect(warnSpy).toHaveBeenCalledTimes(1);
113-
114-
restorePlatform();
115-
restorePlatform = setPlatform("linux");
116-
expect(load()).toBeNull();
117-
expect(warnSpy).toHaveBeenCalledTimes(1);
118120
});
119121
});

0 commit comments

Comments
 (0)