mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-28 06:22:45 -08:00
refactor: add main.ts decomposition guardrails and extract core helpers
This commit is contained in:
20
src/cli/help.test.ts
Normal file
20
src/cli/help.test.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import test from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import { printHelp } from "./help";
|
||||
|
||||
test("printHelp includes configured texthooker port", () => {
|
||||
const original = console.log;
|
||||
let output = "";
|
||||
console.log = (value?: unknown) => {
|
||||
output += String(value);
|
||||
};
|
||||
|
||||
try {
|
||||
printHelp(7777);
|
||||
} finally {
|
||||
console.log = original;
|
||||
}
|
||||
|
||||
assert.match(output, /--help\s+Show this help/);
|
||||
assert.match(output, /default: 7777/);
|
||||
});
|
||||
Reference in New Issue
Block a user