Some checks failed
AI automation / Route event (push) Has been cancelled
AI automation / Hand reopened issue to maintainers (push) Has been cancelled
AI automation / Clean source issue state (push) Has been cancelled
AI automation / Reconcile handoffs (push) Has been cancelled
AI automation / Classify issue (push) Has been cancelled
AI automation / Claude Code smoke (push) Has been cancelled
AI automation / Review issue follow-up (push) Has been cancelled
AI automation / Publish issue follow-up (push) Has been cancelled
AI automation / Implement with Claude Code (push) Has been cancelled
AI automation / Publish implement PR (push) Has been cancelled
AI automation / Continue queued issue comments (push) Has been cancelled
AI automation / Codex review loop (push) Has been cancelled
AI automation / Publish Codex fix (push) Has been cancelled
AI automation / Clear Codex dispatch marker (push) Has been cancelled
AI automation / Own PR re-request Codex (push) Has been cancelled
AI automation / External PR re-request Codex (push) Has been cancelled
AI automation / Poll Codex reaction / retry (push) Has been cancelled
37 lines
1.1 KiB
JavaScript
37 lines
1.1 KiB
JavaScript
const assert = require('node:assert/strict');
|
|
const { readFileSync } = require('node:fs');
|
|
const path = require('node:path');
|
|
const test = require('node:test');
|
|
|
|
const root = __dirname;
|
|
|
|
function read(relativePath) {
|
|
return readFileSync(path.join(root, relativePath), 'utf8');
|
|
}
|
|
|
|
test('terminal windows do not throttle work while hidden or unfocused', () => {
|
|
const windowSources = [
|
|
'bridges/windowManager/mainWindow.cjs',
|
|
'bridges/windowManager/terminalPopupWindow.cjs',
|
|
];
|
|
|
|
for (const relativePath of windowSources) {
|
|
const source = read(relativePath);
|
|
assert.match(source, /webPreferences:\s*\{[\s\S]*?backgroundThrottling:\s*false/, relativePath);
|
|
}
|
|
});
|
|
|
|
test('non-terminal windows and the app itself do not block ordinary power saving', () => {
|
|
const sources = [
|
|
'main.cjs',
|
|
'bridges/windowManager/settingsWindow.cjs',
|
|
'bridges/windowManager/externalWindows.cjs',
|
|
'bridges/globalShortcutBridge.cjs',
|
|
];
|
|
|
|
for (const relativePath of sources) {
|
|
const source = read(relativePath);
|
|
assert.doesNotMatch(source, /backgroundThrottling:\s*false|powerSaveBlocker/, relativePath);
|
|
}
|
|
});
|