mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-10 08:05:14 +02:00
fix(cli): match command tree description separator
This commit is contained in:
parent
d4ce275a3c
commit
e8a7018c55
3 changed files with 5 additions and 5 deletions
|
|
@ -46,12 +46,12 @@ describe('walkCommandTree', () => {
|
|||
describe('formatCommandTree', () => {
|
||||
it('renders a single node with no children', () => {
|
||||
const node = { name: 'solo', description: 'just me', aliases: [], children: [] };
|
||||
expect(formatCommandTree(node)).toBe('solo - just me\n');
|
||||
expect(formatCommandTree(node)).toBe('solo — just me\n');
|
||||
});
|
||||
|
||||
it('renders aliases in parentheses before the description', () => {
|
||||
const node = { name: 'cmd', description: 'does things', aliases: ['c', 'co'], children: [] };
|
||||
expect(formatCommandTree(node)).toBe('cmd (c, co) - does things\n');
|
||||
expect(formatCommandTree(node)).toBe('cmd (c, co) — does things\n');
|
||||
});
|
||||
|
||||
it('omits the dash when description is empty', () => {
|
||||
|
|
@ -75,7 +75,7 @@ describe('formatCommandTree', () => {
|
|||
],
|
||||
};
|
||||
expect(formatCommandTree(tree)).toBe(
|
||||
'root - top\n' + ' alpha (al) - a\n' + ' inner - i\n' + ' beta - b\n',
|
||||
'root — top\n' + ' alpha (al) — a\n' + ' inner — i\n' + ' beta — b\n',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue