feat(cli): add global entrypoint with doctor/update/uninstall commands

This commit is contained in:
ZenchantLive 2026-03-02 20:44:07 -08:00
parent 7945ee8d3c
commit 4a98ab2976
4 changed files with 126 additions and 1 deletions

View file

@ -0,0 +1,22 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import { runCli } from '../../src/cli/beadboard-cli';
test('doctor returns structured install diagnostics', async () => {
const out = await runCli(['doctor', '--json']);
assert.equal(out.ok, true);
assert.ok(out.installMode);
});
test('self-update returns explicit placeholder result', async () => {
const out = await runCli(['self-update', '--json']);
assert.equal(out.ok, true);
assert.equal(out.command, 'self-update');
assert.equal(out.updated, false);
});
test('uninstall requires --yes', async () => {
const out = await runCli(['uninstall', '--json']);
assert.equal(out.ok, false);
assert.match(out.error, /--yes/);
});