mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-26 12:55:16 -07:00
feat(macos): configuration window + curl-backed macOS updater (#71)
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
import { parseArgs } from '../../cli/args';
|
||||
import {
|
||||
getStartupModeFlags,
|
||||
shouldRefreshAnilistOnConfigReload,
|
||||
shouldStartAutomaticUpdateChecks,
|
||||
} from './startup-mode-flags';
|
||||
|
||||
test('config settings startup uses minimal startup and skips background integrations', () => {
|
||||
const args = parseArgs(['--config']);
|
||||
const flags = getStartupModeFlags(args);
|
||||
|
||||
assert.equal(flags.shouldUseMinimalStartup, true);
|
||||
assert.equal(flags.shouldSkipHeavyStartup, true);
|
||||
assert.equal(shouldRefreshAnilistOnConfigReload(args), false);
|
||||
assert.equal(shouldStartAutomaticUpdateChecks(args), false);
|
||||
});
|
||||
|
||||
test('normal startup still allows background integrations', () => {
|
||||
const flags = getStartupModeFlags(null);
|
||||
|
||||
assert.equal(flags.shouldUseMinimalStartup, false);
|
||||
assert.equal(flags.shouldSkipHeavyStartup, false);
|
||||
assert.equal(shouldRefreshAnilistOnConfigReload(null), true);
|
||||
assert.equal(shouldStartAutomaticUpdateChecks(null), true);
|
||||
});
|
||||
Reference in New Issue
Block a user