Files
SenMeshNet/electron/backgroundWorkContinuity.test.cjs
zhaolei 2f9f8da48e
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
Initial commit: NetMesh smart ops platform with 3D topology, inspection reports, RCA and AI ops assistant
2026-10-15 13:53:04 +08:00

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);
}
});