feat(cli): add global entrypoint with doctor/update/uninstall commands
This commit is contained in:
parent
7945ee8d3c
commit
4a98ab2976
4 changed files with 126 additions and 1 deletions
22
tests/cli/beadboard-cli.test.ts
Normal file
22
tests/cli/beadboard-cli.test.ts
Normal 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/);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue