mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-04-26 04:19:27 -07:00
fix(launcher): reject --candidates and --select when used together
- Validate mutually exclusive dictionary CLI flags; exit 1 with clear error - Add parseArgs test covering the conflicting-flags rejection path - Fix test helper to overwrite capture file (>) instead of appending (>>)
This commit is contained in:
@@ -110,6 +110,14 @@ test('parseArgs maps dictionary candidate lookup and manual selection', () => {
|
||||
assert.equal(selectParsed.dictionaryTarget, process.cwd());
|
||||
});
|
||||
|
||||
test('parseArgs rejects conflicting dictionary candidate and selection modes', () => {
|
||||
const exit = withProcessExitIntercept(() => {
|
||||
parseArgs(['dictionary', '--candidates', '--select', '21355', '.'], 'subminer', {});
|
||||
});
|
||||
|
||||
assert.equal(exit.code, 1);
|
||||
});
|
||||
|
||||
test('parseArgs maps stats command and log-level override', () => {
|
||||
const parsed = parseArgs(['stats', '--log-level', 'debug'], 'subminer', {});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user