fix(gateway): prevent reconnect race and globally hide windows subprocess console

This commit is contained in:
Haze
2026-03-02 19:40:16 +08:00
parent dfdbde374d
commit 3596464803
7 changed files with 15 additions and 25 deletions

View File

@@ -3,21 +3,9 @@ import {
getReconnectSkipReason,
isLifecycleSuperseded,
nextLifecycleEpoch,
shouldHideConsoleWindow,
} from '@electron/gateway/process-policy';
describe('gateway process policy helpers', () => {
describe('shouldHideConsoleWindow', () => {
it('returns true on Windows', () => {
expect(shouldHideConsoleWindow('win32')).toBe(true);
});
it('returns false on non-Windows platforms', () => {
expect(shouldHideConsoleWindow('darwin')).toBe(false);
expect(shouldHideConsoleWindow('linux')).toBe(false);
});
});
describe('lifecycle epoch helpers', () => {
it('increments lifecycle epoch by one', () => {
expect(nextLifecycleEpoch(0)).toBe(1);