mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-08-16 13:55:51 -07:00
feat(config): add configuration window (#70)
This commit is contained in:
@@ -2,6 +2,7 @@ import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
import {
|
||||
shouldEnsureTrayOnStartupForInitialArgs,
|
||||
shouldQuitOnMpvShutdownForTrayState,
|
||||
shouldQuitOnWindowAllClosedForTrayState,
|
||||
} from './startup-tray-policy';
|
||||
|
||||
@@ -42,3 +43,36 @@ test('window-all-closed keeps background app alive without tray', () => {
|
||||
false,
|
||||
);
|
||||
});
|
||||
|
||||
test('mpv shutdown quits managed background playback despite tray residency', () => {
|
||||
assert.equal(
|
||||
shouldQuitOnMpvShutdownForTrayState({
|
||||
managedPlayback: true,
|
||||
backgroundMode: true,
|
||||
hasTray: true,
|
||||
}),
|
||||
true,
|
||||
);
|
||||
});
|
||||
|
||||
test('mpv shutdown quits standalone managed playback without tray residency', () => {
|
||||
assert.equal(
|
||||
shouldQuitOnMpvShutdownForTrayState({
|
||||
managedPlayback: true,
|
||||
backgroundMode: false,
|
||||
hasTray: false,
|
||||
}),
|
||||
true,
|
||||
);
|
||||
});
|
||||
|
||||
test('mpv shutdown keeps unmanaged background tray app alive', () => {
|
||||
assert.equal(
|
||||
shouldQuitOnMpvShutdownForTrayState({
|
||||
managedPlayback: false,
|
||||
backgroundMode: true,
|
||||
hasTray: true,
|
||||
}),
|
||||
false,
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user