mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-23 00:11:28 -07:00
feat(stats): add v1 immersion stats dashboard (#19)
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
requestSingleInstanceLockEarly,
|
||||
resetEarlySingleInstanceStateForTests,
|
||||
} from './early-single-instance';
|
||||
import * as earlySingleInstance from './early-single-instance';
|
||||
|
||||
function createFakeApp(lockValue = true) {
|
||||
let requestCalls = 0;
|
||||
@@ -54,3 +55,16 @@ test('registerSecondInstanceHandlerEarly replays queued argv and forwards new ev
|
||||
['SubMiner.exe', '--start', '--show-visible-overlay'],
|
||||
]);
|
||||
});
|
||||
|
||||
test('stats daemon args bypass the normal single-instance lock path', () => {
|
||||
const shouldBypass = (
|
||||
earlySingleInstance as typeof earlySingleInstance & {
|
||||
shouldBypassSingleInstanceLockForArgv?: (argv: string[]) => boolean;
|
||||
}
|
||||
).shouldBypassSingleInstanceLockForArgv;
|
||||
|
||||
assert.equal(typeof shouldBypass, 'function');
|
||||
assert.equal(shouldBypass?.(['SubMiner', '--stats', '--stats-background']), true);
|
||||
assert.equal(shouldBypass?.(['SubMiner', '--stats', '--stats-stop']), true);
|
||||
assert.equal(shouldBypass?.(['SubMiner', '--stats']), false);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user