Fix Windows CodeRabbit review follow-ups

This commit is contained in:
2026-04-10 02:29:28 -07:00
parent 3e7573c9fc
commit 0cdd79da9a
11 changed files with 482 additions and 51 deletions

View File

@@ -14,7 +14,7 @@ test('overlay window config explicitly disables renderer sandbox for preload com
});
test('Windows visible overlay window config does not start as always-on-top', () => {
const originalPlatform = process.platform;
const originalPlatformDescriptor = Object.getOwnPropertyDescriptor(process, 'platform');
Object.defineProperty(process, 'platform', {
configurable: true,
@@ -29,10 +29,9 @@ test('Windows visible overlay window config does not start as always-on-top', ()
assert.equal(options.alwaysOnTop, false);
} finally {
Object.defineProperty(process, 'platform', {
configurable: true,
value: originalPlatform,
});
if (originalPlatformDescriptor) {
Object.defineProperty(process, 'platform', originalPlatformDescriptor);
}
}
});