Tests. Autocomplete. Few Fixes. Mocks for Electrum Service. Template-to-Json parser. Fix global paths. Use IO Dependency injection for logging from cli. Additional commands in CLI.

This commit is contained in:
2026-04-20 10:30:38 +00:00
parent df4f438f6d
commit ff2fe126c6
44 changed files with 8220 additions and 1503 deletions

View File

@@ -0,0 +1,28 @@
import { describe, expect, test } from "vitest";
import { spawnSync } from "node:child_process";
import path from "node:path";
const runCli = (args: string[]) => {
const tsxPath = path.resolve(process.cwd(), "node_modules/.bin/tsx");
const cliPath = path.resolve(process.cwd(), "src/cli/index.ts");
return spawnSync(tsxPath, [cliPath, ...args], {
encoding: "utf8",
cwd: process.cwd(),
});
};
describe("cli entry boundary behavior", () => {
test("returns non-zero for incomplete mnemonic invocation", () => {
const result = runCli(["mnemonic"]);
expect(result.status).toBe(1);
expect(result.stdout).toContain("Usage:");
});
test("returns zero for mnemonic list invocation", () => {
const result = runCli(["mnemonic", "list"]);
expect(result.status).toBe(0);
});
});