mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-05-26 12:55:16 -07:00
28 lines
1019 B
TypeScript
28 lines
1019 B
TypeScript
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);
|
|
});
|